From 50a525b2f12d090ba81e998a143a7e6c7507e745 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 6 Jun 2024 16:04:40 -0400 Subject: [PATCH] Only enable chewy in search-tagged specs --- spec/rails_helper.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 79031f1a943..f7a5382d425 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -55,6 +55,8 @@ Sidekiq.logger = nil DatabaseCleaner.strategy = [:deletion] +Chewy.settings[:enabled] = false + Devise::Test::ControllerHelpers.module_eval do alias_method :original_sign_in, :sign_in @@ -128,6 +130,12 @@ RSpec.configure do |config| example.run 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 stub_reset_connection_pools end