-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
disable search by default and enable sometimes
- Loading branch information
1 parent
7f7a6e2
commit d8f3540
Showing
1 changed file
with
4 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
require 'thinking_sphinx' | ||
require 'thinking_sphinx/test' | ||
|
||
Before "not @search" do | ||
::ThinkingSphinx::Test.disable_search_jobs! | ||
end | ||
|
||
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 | ||
::ThinkingSphinx::Test.disable_search_jobs! |