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