Sha256: 48e091f2cd25c56308b05ee260721b43cfa2ec736be2505c12b87e130ac85ca5
Contents?: true
Size: 620 Bytes
Versions: 18
Compression:
Stored size: 620 Bytes
Contents
require 'spec_helper' describe Dusen::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 = Dusen::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
18 entries across 18 versions & 1 rubygems