]> projects.mako.cc - selectricity-live/blob - vendor/plugins/login_engine/test/mocks/mail.rb
2d620b10d6ae77a07d8faa172a47487778e2dc1a
[selectricity-live] / vendor / plugins / login_engine / test / mocks / mail.rb
1 ActionMailer::Base.class_eval {
2   @@inject_one_error = false
3   cattr_accessor :inject_one_error
4
5   private
6   def perform_delivery_test(mail)
7     if inject_one_error
8       ActionMailer::Base::inject_one_error = false
9       raise "Failed to send email" if raise_delivery_errors
10     else
11       deliveries << mail
12     end
13   end
14 }

Benjamin Mako Hill || Want to submit a patch?