class RSpec::Rails::Matchers::SendEmail
def sent_emails_message
def sent_emails_message if @diff.empty? "\n\nThere were no any emails sent inside the expectation block." else sent_emails = @diff.map do |email| inspected = INSPECT_EMAIL_ATTRIBUTES.map { |attr| "#{attr}: #{email.public_send(attr)}" }.join(", ") "- #{inspected}" end.join("\n") "\n\nThe following emails were sent:\n#{sent_emails}" end end