Move chewy enable for spec to search data manager (#38054)

This commit is contained in:
Matt Jankowski
2026-03-05 10:07:41 -05:00
committed by GitHub
parent 9b4a09f760
commit 58ef0f6aee
2 changed files with 3 additions and 2 deletions

View File

@@ -57,8 +57,6 @@ Sidekiq.default_configuration.logger = nil
DatabaseCleaner.strategy = [:deletion]
Chewy.settings[:enabled] = false
Devise::Test::ControllerHelpers.module_eval do
alias_method :original_sign_in, :sign_in

View File

@@ -45,11 +45,14 @@ end
RSpec.configure do |config|
config.before :suite do
if search_examples_present?
Chewy.settings[:enabled] = true
# Configure chewy to use `urgent` strategy to index documents
Chewy.strategy(:urgent)
# Create search data
search_data_manager.prepare_test_data
else
Chewy.settings[:enabled] = false
end
end