Commit ac5c952d1787aaf8b9c0687c84f6867548a71955
1 parent
a3693853
Exists in
master
and in
2 other branches
Improved tests start time [skip ci]
Showing
8 changed files
with
37 additions
and
5 deletions
Show diff stats
test/conversions_test.rb
test/geo_shape_test.rb
test/index_test.rb
test/match_test.rb
test/multi_indices_test.rb
test/query_test.rb
test/search_synonyms_test.rb
test/support/helpers.rb
... | ... | @@ -11,18 +11,25 @@ class Minitest::Test |
11 | 11 | |
12 | 12 | Store.reindex |
13 | 13 | Animal.reindex |
14 | - Speaker.reindex | |
15 | - Region.reindex | |
16 | 14 | end |
17 | 15 | |
18 | 16 | Product.destroy_all |
19 | 17 | Store.destroy_all |
20 | 18 | Animal.destroy_all |
21 | - Speaker.destroy_all | |
22 | 19 | end |
23 | 20 | |
24 | 21 | protected |
25 | 22 | |
23 | + def setup_region | |
24 | + $setup_region ||= (Region.reindex || true) | |
25 | + Region.destroy_all | |
26 | + end | |
27 | + | |
28 | + def setup_speaker | |
29 | + $setup_speaker ||= (Speaker.reindex || true) | |
30 | + Speaker.destroy_all | |
31 | + end | |
32 | + | |
26 | 33 | def store(documents, model = default_model, reindex: true) |
27 | 34 | if reindex |
28 | 35 | documents.shuffle.each do |document| | ... | ... |