lib/helpers/integration_test_helper.rb
# asserts that an email has been sent
asserts that an email has been sent
asserts that an email has been sent
def assert_email_sent(keyword=nil)
    deliveries = ActionMailer::Base.deliveries
    assert deliveries.size > 0, "email should have been sent"
    assert_match(/#{keyword.to_s}/, deliveries[0].body, "email did not contain keyword '#{keyword}'") if keyword
  end
def assert_email_sent ( keyword = nil ) deliveries = ActionMailer :: Base . deliveries assert deliveries . size > 0 , "email should have been sent" assert_match ( / #{ keyword . to_s } / , deliveries [ 0 ] . body , "email did not contain keyword '#{keyword}'" ) if keyword end
asserts that an email has been sent
asserts that an email has been sent
keyword