aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer/test/i18n_with_controller_test.rb
diff options
context:
space:
mode:
authorZuhao Wan <wanzuhao@gmail.com>2014-06-07 00:52:24 +0800
committerZuhao Wan <wanzuhao@gmail.com>2014-06-07 00:52:24 +0800
commit573a8421e7e5937c7afbd4b9140136e444db645a (patch)
tree15a7a0164bd967195114f59ff638f9005d426c2c /actionmailer/test/i18n_with_controller_test.rb
parent0502189b504640a95a4729fac5c6a41c27de960f (diff)
downloadrails-573a8421e7e5937c7afbd4b9140136e444db645a.tar.gz
rails-573a8421e7e5937c7afbd4b9140136e444db645a.tar.bz2
rails-573a8421e7e5937c7afbd4b9140136e444db645a.zip
Restore I18n.locale to default after test.
If i18n_with_controller_test.rb were to run first, the I18n.locale will be changed to :de, and the following tests in base_test.rb will fail: "subject gets default from I18n" “default subject can have interpolations” "translations are scoped properly" "implicit multipart with default locale"
Diffstat (limited to 'actionmailer/test/i18n_with_controller_test.rb')
-rw-r--r--actionmailer/test/i18n_with_controller_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionmailer/test/i18n_with_controller_test.rb b/actionmailer/test/i18n_with_controller_test.rb
index d502d42ffd..d9d588a950 100644
--- a/actionmailer/test/i18n_with_controller_test.rb
+++ b/actionmailer/test/i18n_with_controller_test.rb
@@ -32,6 +32,10 @@ class ActionMailerI18nWithControllerTest < ActionDispatch::IntegrationTest
Routes
end
+ teardown do
+ I18n.locale = I18n.default_locale
+ end
+
def test_send_mail
with_translation 'de', email_subject: '[Anmeldung] Willkommen' do
get '/test/send_mail'