From 573a8421e7e5937c7afbd4b9140136e444db645a Mon Sep 17 00:00:00 2001 From: Zuhao Wan Date: Sat, 7 Jun 2014 00:52:24 +0800 Subject: Restore I18n.locale to default after test. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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" --- actionmailer/test/i18n_with_controller_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'actionmailer/test/i18n_with_controller_test.rb') 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' -- cgit v1.2.3