spec/lib/query/combination_spec.rb in picky-0.3.0 vs spec/lib/query/combination_spec.rb in picky-0.9.0
- old
+ new
@@ -9,10 +9,19 @@
@token = stub :token, :text => :some_text, :partial => false, :similar? => true
@category = stub :category, :bundle_for => @bundle, :name => :some_category_name
@combination = Query::Combination.new @token, @category
end
-
+
+ describe "to_s" do
+ it "shows the combination's info" do
+ @bundle.stub! :name => :bundle_name
+ @token.stub! :to_result => :token_result
+
+ @combination.to_s.should == 'bundle_name some_category_name:token_result'
+ end
+ end
+
describe 'hash' do
it 'should hash the token and the bundle' do
@combination.hash.should == [@token.to_s, @bundle].hash
end
end
\ No newline at end of file