Commit d5312b89af4d6bb0c2a7abdcad46b88c2353dcf8
1 parent
5979937e
Exists in
master
and in
2 other branches
Fixed test code
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
test/index_options_test.rb
test/support/helpers.rb
... | ... | @@ -83,10 +83,12 @@ class Minitest::Test |
83 | 83 | def with_options(options, model = default_model) |
84 | 84 | previous_options = model.searchkick_options.dup |
85 | 85 | begin |
86 | + model.instance_variable_set(:@searchkick_index_name, nil) | |
86 | 87 | model.searchkick_options.merge!(options) |
87 | 88 | model.reindex |
88 | 89 | yield |
89 | 90 | ensure |
91 | + model.instance_variable_set(:@searchkick_index_name, nil) | |
90 | 92 | model.searchkick_options.clear |
91 | 93 | model.searchkick_options.merge!(previous_options) |
92 | 94 | end | ... | ... |