From 31780ddac7a89eab1e0552a32b403f2040a37931 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Thu, 2 Mar 2017 21:33:54 -0800 Subject: [PATCH] Updated test examples [skip ci] --- README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 612525f..a4f22da 100644 --- a/README.md +++ b/README.md @@ -1696,10 +1696,11 @@ For performance, only enable Searchkick callbacks for the tests that need it. Add to your `test/test_helper.rb`: ```ruby -Searchkick.disable_callbacks - -# and reindex models +# reindex models Product.reindex + +# and disable callbacks +Searchkick.disable_callbacks ``` And use: @@ -1729,10 +1730,11 @@ Add to your `spec/spec_helper.rb`: ```ruby RSpec.configure do |config| config.before(:suite) do - Searchkick.disable_callbacks - - # and reindex models + # reindex models Product.reindex + + # and disable callbacks + Searchkick.disable_callbacks end config.around(:each, search: true) do |example| -- libgit2 0.21.0