aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-01-29 00:47:16 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2017-01-29 00:52:44 +0900
commita28f8b5baf10425f53766cad71701e4c18a22d88 (patch)
tree9f2909e56f365c302b1f5a5a0b5753f10a2efc21 /actionmailer
parentc1317587921688ca081f5c326285ee207fb6e957 (diff)
downloadrails-a28f8b5baf10425f53766cad71701e4c18a22d88.tar.gz
rails-a28f8b5baf10425f53766cad71701e4c18a22d88.tar.bz2
rails-a28f8b5baf10425f53766cad71701e4c18a22d88.zip
restore `delivery_method` after test
Currently use two variables to restore `delivery_method`, but the order of restoring the values is incorrect and does not restore is correctly.
Diffstat (limited to 'actionmailer')
-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