How to I test actionmailer for failed delivery

I want to simulate a scenario where email sent using actionmailer has failed. How do I induce mail delivery error in my tests ?


begin   UserNotify.deliver_signup(@user, params['user']['password'], url) rescue    puts "user confirmation email error"    <....other code ... > end

I need to verify that user_confirmation_email_error is printed when deliver_* method throws an exception