Use around hook to restore context in InstanceHelper spec (#3429)
This commit is contained in:
		
							parent
							
								
									6f064d0e65
								
							
						
					
					
						commit
						80598c9190
					
				
					 1 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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'
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue