spec/lib/query/base_spec.rb in picky-1.2.4 vs spec/lib/query/base_spec.rb in picky-1.3.0

- old
+ new

@@ -121,29 +121,25 @@ it 'should tokenize using the tokenizer' do @query.tokenized('some text').should == :some_tokenized_text end end end - - describe "results_from" do - describe 'Full' do + + describe 'to_s' do + context 'with weights' do before(:each) do - @query = Query::Full.new @index + @query = Query::Full.new @index, weights: :some_weights end - it "should work" do - allocations = stub :allocations, :process! => true - - @query.results_from allocations + it 'works correctly' do + @query.to_s.should == 'Query::Full, weights: some_weights' end end - describe 'Live' do + context 'without weights' do before(:each) do - @query = Query::Live.new @index + @query = Query::Full.new @index end - it "should work" do - allocations = stub :allocations, :process! => true - - @query.results_from allocations + it 'works correctly' do + @query.to_s.should == 'Query::Full' end end end end \ No newline at end of file