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:32:33 +0900
committerMatt Jankowski <mjankowski@thoughtbot.com>2017-05-30 06:32:33 -0400
commitdfc43a6d3d3279d615b78fe2ac7f4c2060bcbe88 (patch)
treed2863951f0fc35d6ae468f6eb4db3eedd0547621 /spec/helpers
parent67bc58dd60645a9451899e3368ae40a1edd4806c (diff)
Use around hook to restore context in InstanceHelper spec (#3429)
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/instance_helper_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/helpers/instance_helper_spec.rb b/spec/helpers/instance_helper_spec.rb
index c42ed6938..c3d28544f 100644
--- a/spec/helpers/instance_helper_spec.rb
+++ b/spec/helpers/instance_helper_spec.rb
@@ -4,6 +4,12 @@ require 'rails_helper'
 
 describe InstanceHelper do
   describe 'site_title' do
+    around do |example|
+      site_title = Setting.site_title
+      example.run
+      Setting.site_title = site_title
+    end
+
     it 'Uses the Setting.site_title value when it exists' do
       Setting.site_title = 'New site title'