Commit a07a87ca8ac2ed7c8f7e44f23635f4b592793b5d

Authored by Andrew Kane
1 parent afc17a41

DRY test [skip ci]

Showing 1 changed file with 10 additions and 6 deletions   Show diff stats
test/index_options_test.rb
... ... @@ -7,22 +7,26 @@ class IndexOptionsTest < Minitest::Test
7 7  
8 8 def test_case_sensitive
9 9 with_options(Song, case_sensitive: true) do
10   - store_names ["Test", "test"], Song
11   - assert_search "test", ["test"], {misspellings: false}, Song
  10 + store_names ["Test", "test"]
  11 + assert_search "test", ["test"], {misspellings: false}
12 12 end
13 13 end
14 14  
15 15 def test_no_stemming
16 16 with_options(Song, stem: false) do
17   - store_names ["milk", "milks"], Song
18   - assert_search "milks", ["milks"], {misspellings: false}, Song
  17 + store_names ["milk", "milks"]
  18 + assert_search "milks", ["milks"], {misspellings: false}
19 19 end
20 20 end
21 21  
22 22 def test_special_characters
23 23 with_options(Song, special_characters: false) do
24   - store_names ["jalapeño"], Song
25   - assert_search "jalapeno", [], {misspellings: false}, Song
  24 + store_names ["jalapeño"]
  25 + assert_search "jalapeno", [], {misspellings: false}
26 26 end
27 27 end
  28 +
  29 + def default_model
  30 + Song
  31 + end
28 32 end
... ...