Sha256: 1e0a3373be45f5a43e873bfb2639a9305786b576f9b43c59171079b8b6c9dc69
Contents?: true
Size: 605 Bytes
Versions: 11
Compression:
Stored size: 605 Bytes
Contents
describe Minidusen::Query do describe '#condensed' do it 'should return a version of the query where all text tokens have been collapsed into a single token with an Array value' do query = Minidusen::Parser.parse('field:value foo bar baz') query.tokens.size.should == 4 condensed_query = query.condensed condensed_query.tokens.size.should == 2 condensed_query[0].field.should == 'field' condensed_query[0].value.should == 'value' condensed_query[1].field.should == 'text' condensed_query[1].value.should == ['foo', 'bar', 'baz'] end end end
Version data entries
11 entries across 11 versions & 1 rubygems