aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test
diff options
context:
space:
mode:
authorAditya Kapoor <aditya.kapoor@vinsol.com>2015-02-07 13:38:18 +0530
committerAditya Kapoor <aditya.kapoor@vinsol.com>2015-02-07 13:38:18 +0530
commit7b58423251344824b58825d5b5e6597cb3e5c21c (patch)
tree9106f45dc692cccdf24721c913550458ee8a625c /actionmailer/test
parentb9ba90d59ed28c28c07b04ecdc2035b471aea881 (diff)
downloadrails-7b58423251344824b58825d5b5e6597cb3e5c21c.tar.gz
rails-7b58423251344824b58825d5b5e6597cb3e5c21c.tar.bz2
rails-7b58423251344824b58825d5b5e6597cb3e5c21c.zip
remove noise from AM tests
Diffstat (limited to 'actionmailer/test')
-rw-r--r--actionmailer/test/test_helper_test.rb21
1 files changed, 16 insertions, 5 deletions
diff --git a/actionmailer/test/test_helper_test.rb b/actionmailer/test/test_helper_test.rb
index 772751af87..089933e245 100644
--- a/actionmailer/test/test_helper_test.rb
+++ b/actionmailer/test/test_helper_test.rb
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require 'active_support/testing/stream'
class TestHelperMailer < ActionMailer::Base
def test
@@ -10,6 +11,8 @@ class TestHelperMailer < ActionMailer::Base
end
class TestHelperMailerTest < ActionMailer::TestCase
+ include ActiveSupport::Testing::Stream
+
def test_setup_sets_right_action_mailer_options
assert_equal :test, ActionMailer::Base.delivery_method
assert ActionMailer::Base.perform_deliveries
@@ -122,7 +125,9 @@ class TestHelperMailerTest < ActionMailer::TestCase
def test_assert_enqueued_emails
assert_nothing_raised do
assert_enqueued_emails 1 do
- TestHelperMailer.test.deliver_later
+ silence_stream($stdout) do
+ TestHelperMailer.test.deliver_later
+ end
end
end
end
@@ -130,7 +135,9 @@ class TestHelperMailerTest < ActionMailer::TestCase
def test_assert_enqueued_emails_too_few_sent
error = assert_raise ActiveSupport::TestCase::Assertion do
assert_enqueued_emails 2 do
- TestHelperMailer.test.deliver_later
+ silence_stream($stdout) do
+ TestHelperMailer.test.deliver_later
+ end
end
end
@@ -140,8 +147,10 @@ class TestHelperMailerTest < ActionMailer::TestCase
def test_assert_enqueued_emails_too_many_sent
error = assert_raise ActiveSupport::TestCase::Assertion do
assert_enqueued_emails 1 do
- TestHelperMailer.test.deliver_later
- TestHelperMailer.test.deliver_later
+ silence_stream($stdout) do
+ TestHelperMailer.test.deliver_later
+ TestHelperMailer.test.deliver_later
+ end
end
end
@@ -159,7 +168,9 @@ class TestHelperMailerTest < ActionMailer::TestCase
def test_assert_no_enqueued_emails_failure
error = assert_raise ActiveSupport::TestCase::Assertion do
assert_no_enqueued_emails do
- TestHelperMailer.test.deliver_later
+ silence_stream($stdout) do
+ TestHelperMailer.test.deliver_later
+ end
end
end