about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-06-01 00:09:28 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-05-31 17:09:28 +0200
commit1a4860a57ad3b66e16aceef4fdf70c8ca11d1400 (patch)
treee731a13ba173b2dc7871b41b625d29737e85691d
parent41fa53253c09f70f4830e10b86d51d5dfb0b5fa9 (diff)
Hold value of I18n.locale with ApplicationHelperSpec (#3474)
-rw-r--r--spec/helpers/application_helper_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index 7b875e21f..ac54f1f70 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -18,6 +18,12 @@ describe ApplicationHelper do
   end
 
   describe 'add_rtl_body_class' do
+    around do |example|
+      current_locale = I18n.locale
+      example.run
+      I18n.locale = current_locale
+    end
+
     it 'adds rtl body class if locale is Arabic' do
       I18n.locale = :ar
       expect(helper.add_rtl_body_class('other classes')).to eq 'other classes rtl'