assert_emails (ActionMailer::TestHelper)

    # File lib/action_mailer/test_helper.rb, line 25
        def assert_emails(number)
          if block_given?
            original_count = ActionMailer::Base.deliveries.size
            yield
            new_count = ActionMailer::Base.deliveries.size
            assert_equal original_count + number, new_count, "#{number} emails expected, but #{new_count - original_count} were sent"
          else
            assert_equal number, ActionMailer::Base.deliveries.size
          end
        end