Only enable chewy in search-tagged specs (#30583)
This commit is contained in:
		
							parent
							
								
									7c26e5e4a1
								
							
						
					
					
						commit
						69dbc23038
					
				@ -55,6 +55,8 @@ Sidekiq.logger = nil
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
DatabaseCleaner.strategy = [:deletion]
 | 
					DatabaseCleaner.strategy = [:deletion]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Chewy.settings[:enabled] = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Devise::Test::ControllerHelpers.module_eval do
 | 
					Devise::Test::ControllerHelpers.module_eval do
 | 
				
			||||||
  alias_method :original_sign_in, :sign_in
 | 
					  alias_method :original_sign_in, :sign_in
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -129,6 +131,12 @@ RSpec.configure do |config|
 | 
				
			|||||||
    example.run
 | 
					    example.run
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  config.around(:each, type: :search) do |example|
 | 
				
			||||||
 | 
					    Chewy.settings[:enabled] = true
 | 
				
			||||||
 | 
					    example.run
 | 
				
			||||||
 | 
					    Chewy.settings[:enabled] = false
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  config.before :each, type: :cli do
 | 
					  config.before :each, type: :cli do
 | 
				
			||||||
    stub_reset_connection_pools
 | 
					    stub_reset_connection_pools
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user