]> cat aescling's git repositories - mastodon.git/commitdiff
Use around hook to restore context in InstanceHelper spec (#3429)
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
Tue, 30 May 2017 10:32:33 +0000 (19:32 +0900)
committerMatt Jankowski <mjankowski@thoughtbot.com>
Tue, 30 May 2017 10:32:33 +0000 (06:32 -0400)
spec/helpers/instance_helper_spec.rb

index c42ed693886e9ca65b63762a0a26a294734c36ca..c3d28544f2ddab78b69be6d10dd814fa58d7a09d 100644 (file)
@@ -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'