devise
https://github.com/plataformatec/devise
Ruby
Flexible authentication solution for Rails with Warden.
Mail::Message#perform_deliveries
If set to false, mail will go through the motions of doing a delivery, but not actually call the delivery method or append the mail object to the Mail.deliveries collection. Useful for testing. Mail.deliveries.size #=> 0 mail.delivery_method :smtp mail.perform_deliveries = false mail.deliver # Mail::SMTP not called here Mail.deliveries.size #=> 0 If you want to test and query the Mail.deliveries collection to see what mail you sent, you should set perform_deliveries to true and use the :test mail delivery_method: Mail.deliveries.size #=> 0 mail.delivery_method :test mail.perform_deliveries = true mail.deliver Mail.deliveries.size #=> 1 This setting is ignored by mail (though still available as a flag) if you define a delivery_handler
Edit
git clone [email protected]:plataformatec/devise.git
cd devise
open
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Mail--Message-perform_deliveries-for-pr
# Commit to gitgit add git commit -m "better docs for Mail::Message#perform_deliveries"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Mail--Message-perform_deliveries-for-pr
hub pull-request
# Celebrate!