diff options
author | Matt Gleeson <mgleeson@atlassian.com> | 2013-09-25 18:19:42 -0700 |
---|---|---|
committer | Matt Gleeson <mgleeson@atlassian.com> | 2013-09-25 18:19:42 -0700 |
commit | 5ad588929b4afc319c052d6640296526fa949376 (patch) | |
tree | 15bf34cd739637dd8c8c4a3589032b385915b441 /spec | |
parent | e1cdcdbd9b1776df95b94cbe9df5978599138e97 (diff) | |
download | chef-zero-5ad588929b4afc319c052d6640296526fa949376.tar.gz |
switch to string tests for less confusion.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/search_spec.rb | 8 |
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 |