Browse Source

Use around hook to restore context in ApplicationHelper spec (#3432)

closed-social-v3
Akihiko Odaki 7 years ago
committed by Matt Jankowski
parent
commit
2d39560dc1
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      spec/helpers/application_helper_spec.rb

+ 6
- 0
spec/helpers/application_helper_spec.rb View File

@ -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)

Loading…
Cancel
Save