Module | Shoulda::ActionMailer::Assertions |
In: |
lib/shoulda/action_mailer/assertions.rb
|
Asserts that an email was delivered. Can take a block that can further narrow down the types of emails you‘re expecting.
assert_sent_email
Passes if ActionMailer::Base.deliveries has an email
assert_sent_email do |email| email.subject =~ /hi there/ && email.to.include?('none@none.com') end
Passes if there is an email with subject containing ‘hi there’ and ‘none@none.com’ as one of the recipients.