diff --git a/features/support/sphinx.rb b/features/support/sphinx.rb index 2942621bea..4bb41c9b00 100644 --- a/features/support/sphinx.rb +++ b/features/support/sphinx.rb @@ -1,23 +1,22 @@ require 'thinking_sphinx' require 'thinking_sphinx/test' -Before "not @search" do +BeforeAll do ::ThinkingSphinx::Test.disable_search_jobs! end -Before('@search') do +Before '@search' do Sidekiq::Job.clear_all ::ThinkingSphinx::Test.stop ::ThinkingSphinx::Test.clear ::ThinkingSphinx::Test.init $searchd_autostop_installed ||= ::ThinkingSphinx::Test.autostop ::ThinkingSphinx::Test.wait_start + + ::ThinkingSphinx::Test.enable_search_jobs! end After '@search' do + ::ThinkingSphinx::Test.disable_search_jobs! ::ThinkingSphinx::Test.stop end - -After "not @search" do - ::ThinkingSphinx::Test.enable_search_jobs! -end