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

This commit is contained in:
Matt Jankowski authored and GitHub committed 2026-03-05 15:07:41 +00:00
1 parent 9b4a09f760
commit 58ef0f6aee
2 files changed
+3 -2

No files matched your search

-2
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
+3
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