aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-01-28 17:16:11 +0100
committerGitHub <noreply@github.com>2017-01-28 17:16:11 +0100
commit805826971b53b9b9810ddf941ee332c3d6ab0e19 (patch)
tree9f2909e56f365c302b1f5a5a0b5753f10a2efc21
parentc1317587921688ca081f5c326285ee207fb6e957 (diff)
parenta28f8b5baf10425f53766cad71701e4c18a22d88 (diff)
downloadrails-805826971b53b9b9810ddf941ee332c3d6ab0e19.tar.gz
rails-805826971b53b9b9810ddf941ee332c3d6ab0e19.tar.bz2
rails-805826971b53b9b9810ddf941ee332c3d6ab0e19.zip
Merge pull request #27835 from y-yagi/restore_delivery_method_after_test
restore `delivery_method` after test
-rw-r--r--actionmailer/test/parameterized_test.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/actionmailer/test/parameterized_test.rb b/actionmailer/test/parameterized_test.rb
index 47cfe6d712..f52945590b 100644
--- a/actionmailer/test/parameterized_test.rb
+++ b/actionmailer/test/parameterized_test.rb
@@ -9,10 +9,9 @@ class ParameterizedTest < ActiveSupport::TestCase
@previous_logger = ActiveJob::Base.logger
ActiveJob::Base.logger = Logger.new(nil)
- @original_delivery_method = ActionMailer::Base.delivery_method
+ @previous_delivery_method = ActionMailer::Base.delivery_method
ActionMailer::Base.delivery_method = :test
- @previous_delivery_method = ActionMailer::Base.delivery_method
@previous_deliver_later_queue_name = ActionMailer::Base.deliver_later_queue_name
ActionMailer::Base.deliver_later_queue_name = :test_queue
ActionMailer::Base.delivery_method = :test
@@ -24,8 +23,6 @@ class ParameterizedTest < ActiveSupport::TestCase
ActiveJob::Base.logger = @previous_logger
ParamsMailer.deliveries.clear
- ActionMailer::Base.delivery_method = @original_delivery_method
-
ActionMailer::Base.delivery_method = @previous_delivery_method
ActionMailer::Base.deliver_later_queue_name = @previous_deliver_later_queue_name
end