about summary refs log tree commit diff
path: root/spec/helpers
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2017-05-30 19:29:48 +0900
committerMatt Jankowski <mjankowski@thoughtbot.com>2017-05-30 06:29:48 -0400
commit2d39560dc1811c29c1663b11a4a351089898e244 (patch)
tree0c8c3eff7854c051d3e8a46bd11e32f25ff3dfbb /spec/helpers
parentc49ff7395e911c4254d75ec29702af34d07508a7 (diff)
Use around hook to restore context in ApplicationHelper spec (#3432)
Diffstat (limited to 'spec/helpers')
-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 a3903464b..7b875e21f 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -100,6 +100,12 @@ describe ApplicationHelper do
   end
 
   describe 'title' do
+    around do |example|
+      site_title = Setting.site_title
+      example.run
+      Setting.site_title = site_title
+    end
+
     it 'returns site title on production enviroment' do
       Setting.site_title = 'site title'
       expect(Rails.env).to receive(:production?).and_return(true)