@@ -56,7 +56,7 @@ class ::Series < ActiveRecord::Base
56
56
end
57
57
58
58
should "find matching documents across multiple models" do
59
- response = Elasticsearch ::Model . search ( " \" The greatest Episode\ " ^2 OR \ " The greatest Series\" " , [ Series , Episode ] )
59
+ response = Elasticsearch ::Model . search ( %q<" The greatest Episode"^2 OR "The greatest Series"> , [ Series , Episode ] )
60
60
61
61
assert response . any? , "Response should not be empty: #{ response . to_a . inspect } "
62
62
@@ -75,7 +75,7 @@ class ::Series < ActiveRecord::Base
75
75
end
76
76
77
77
should "provide access to results" do
78
- response = Elasticsearch ::Model . search ( " \" A great Episode\ " ^2 OR \ " A great Series\" " , [ Series , Episode ] )
78
+ response = Elasticsearch ::Model . search ( %q<" A great Episode"^2 OR "A great Series"> , [ Series , Episode ] )
79
79
80
80
assert_equal 'A great Episode' , response . results [ 0 ] . name
81
81
assert_equal true , response . results [ 0 ] . name?
@@ -89,7 +89,7 @@ class ::Series < ActiveRecord::Base
89
89
should "only retrieve records for existing results" do
90
90
::Series . find_by_name ( "The greatest Series" ) . delete
91
91
::Series . __elasticsearch__ . refresh_index!
92
- response = Elasticsearch ::Model . search ( " \" The greatest Episode\ " ^2 OR \ " The greatest Series\" " , [ Series , Episode ] )
92
+ response = Elasticsearch ::Model . search ( %q<" The greatest Episode"^2 OR "The greatest Series"> , [ Series , Episode ] )
93
93
94
94
assert response . any? , "Response should not be empty: #{ response . to_a . inspect } "
95
95
@@ -138,7 +138,7 @@ def as_indexed_json(options={})
138
138
end
139
139
140
140
should "find matching documents across multiple models" do
141
- response = Elasticsearch ::Model . search ( " \" greatest Episode\ " OR \ " greatest Image\ " ^2" , [ Episode , Image ] )
141
+ response = Elasticsearch ::Model . search ( %q<" greatest Episode" OR "greatest Image"^2> , [ Episode , Image ] )
142
142
143
143
assert response . any? , "Response should not be empty: #{ response . to_a . inspect } "
144
144
0 commit comments