Class: Mail::TestMailer

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/mail/network/delivery_methods/test_mailer.rb

Class Method Summary collapse

Class Method Details

.deliver!(mail) ⇒ Object

The Test Mailer provides a mail delivery method that does not hit your network or mail agent, in this way you can send all the emails you want and they will just be appended to Mail.deliveries

See the README under Using Mail with Testing or Spec’ing Libraries for more information.



11
12
13
# File 'lib/mail/network/delivery_methods/test_mailer.rb', line 11

def TestMailer.deliver!(mail)
  Mail.deliveries << mail
end