title: Rails 4, RSpec 3.2 - how to mockup ActionMailer's deliver_now method to raise exceptions
body: <p>Environment</p>
  
  <p>Ruby 2.2.1, Rails 4.2.0, rspec-core 3.2.2, rspec-expectations 3.2.0, rspec-mocks 3.2.1, rspec-rails 3.2.1, rspec-support 3.2.2</p>
  
  <p>I have the following method</p>
  
  <pre><code>def send_event_alert_email(event_id)
    event = Event.find_by(id: event_id)
    ...
    ...     
    ...
    EventAlertMailer.event_alert(event_id).deliver_now
  
    create_alert(event)
  end
  </code></pre>
  
  <p>I need to write specs which makes sure that <code>create_alert(event)</code> doesn't get invoked when <code>EventAlertMailer.event_alert(event_id).deliver_now</code> raises any exceptions. So the basic question is how do I simulate <code>deliver_now</code> to raise possible exceptions which it might actually throw.</p>