# File lib/shoulda/action_mailer/assertions.rb, line 18 18: def assert_sent_email 19: ::ActiveSupport::Deprecation.warn("use: should have_sent_email") 20: emails = ::ActionMailer::Base.deliveries 21: assert !emails.empty?, "No emails were sent" 22: if block_given? 23: matching_emails = emails.select {|email| yield email } 24: assert !matching_emails.empty?, "None of the emails matched." 25: end 26: end