From dfc43a6d3d3279d615b78fe2ac7f4c2060bcbe88 Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Tue, 30 May 2017 19:32:33 +0900 Subject: [PATCH] Use around hook to restore context in InstanceHelper spec (#3429) --- spec/helpers/instance_helper_spec.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spec/helpers/instance_helper_spec.rb b/spec/helpers/instance_helper_spec.rb index c42ed693886..c3d28544f2d 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'