summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMatt Gleeson <mgleeson@atlassian.com>2013-09-25 18:19:42 -0700
committerMatt Gleeson <mgleeson@atlassian.com>2013-09-25 18:19:42 -0700
commit5ad588929b4afc319c052d6640296526fa949376 (patch)
tree15bf34cd739637dd8c8c4a3589032b385915b441 /spec
parente1cdcdbd9b1776df95b94cbe9df5978599138e97 (diff)
downloadchef-zero-5ad588929b4afc319c052d6640296526fa949376.tar.gz
switch to string tests for less confusion.
Diffstat (limited to 'spec')
-rw-r--r--spec/search_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/search_spec.rb b/spec/search_spec.rb
index aa222fa..ac81acc 100644
--- a/spec/search_spec.rb
+++ b/spec/search_spec.rb
@@ -6,21 +6,21 @@ require 'chef_zero/solr/solr_doc'
describe ChefZero::Solr::SolrParser do
let (:all_docs) do
docs = []
- [{'foo' => 1},
- {'foo' => 7}].each_with_index do |h, i|
+ [{'foo' => 'a'},
+ {'foo' => 'd'}].each_with_index do |h, i|
docs.push ChefZero::Solr::SolrDoc.new(h, i)
end
docs
end
it "handles terms" do
- q = ChefZero::Solr::SolrParser.new('foo:7').parse
+ q = ChefZero::Solr::SolrParser.new('foo:d').parse
results = all_docs.select {|doc| q.matches_doc?(doc) }
results.size.should eq(1)
end
it "handles ranges" do
- q = ChefZero::Solr::SolrParser.new('foo:[1 TO 5]').parse
+ q = ChefZero::Solr::SolrParser.new('foo:[a TO c]').parse
results = all_docs.select {|doc| q.matches_doc?(doc) }
results.size.should eq(1)
end