aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/test_helper_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionmailer/test/test_helper_test.rb')
-rw-r--r--actionmailer/test/test_helper_test.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionmailer/test/test_helper_test.rb b/actionmailer/test/test_helper_test.rb
index 089933e245..0a4bc75d3e 100644
--- a/actionmailer/test/test_helper_test.rb
+++ b/actionmailer/test/test_helper_test.rb
@@ -112,6 +112,17 @@ class TestHelperMailerTest < ActionMailer::TestCase
assert_match(/1 .* but 2/, error.message)
end
+ def test_assert_emails_message
+ TestHelperMailer.test.deliver_now
+ error = assert_raise ActiveSupport::TestCase::Assertion do
+ assert_emails 2 do
+ TestHelperMailer.test.deliver_now
+ end
+ end
+ assert_match "Expected: 2", error.message
+ assert_match "Actual: 1", error.message
+ end
+
def test_assert_no_emails_failure
error = assert_raise ActiveSupport::TestCase::Assertion do
assert_no_emails do