Commit 0604904b6c57b92377e1bb74f9a117f9c747c1bb
1 parent
9483e7d3
Exists in
master
and in
17 other branches
Keep regexp tests together [skip ci]
Showing
1 changed file
with
5 additions
and
5 deletions
Show diff stats
test/where_test.rb
... | ... | @@ -74,11 +74,6 @@ class WhereTest < Minitest::Test |
74 | 74 | assert_search "*", ["Product A"], where: {name: /Pro.+/} |
75 | 75 | end |
76 | 76 | |
77 | - def test_prefix | |
78 | - store_names ["Product A", "Product B", "Item C"] | |
79 | - assert_search "*", ["Product A", "Product B"], where: { name: { prefix: 'Pro'}} | |
80 | - end | |
81 | - | |
82 | 77 | def test_alternate_regexp |
83 | 78 | store_names ["Product A", "Item B"] |
84 | 79 | assert_search "*", ["Product A"], where: {name: {regexp: "Pro.+"}} |
... | ... | @@ -89,6 +84,11 @@ class WhereTest < Minitest::Test |
89 | 84 | assert_search "*", ["Product <A>"], where: {name: /Pro.+<.+/} |
90 | 85 | end |
91 | 86 | |
87 | + def test_prefix | |
88 | + store_names ["Product A", "Product B", "Item C"] | |
89 | + assert_search "*", ["Product A", "Product B"], where: {name: {prefix: "Pro"}} | |
90 | + end | |
91 | + | |
92 | 92 | def test_where_string |
93 | 93 | store [ |
94 | 94 | {name: "Product A", color: "RED"} | ... | ... |