spec/lib/query/token_spec.rb in picky-4.6.0 vs spec/lib/query/token_spec.rb in picky-4.6.1
- old
+ new
@@ -92,11 +92,11 @@
end
it 'returns a list of tokens with the right original' do
token.similar_tokens_for(@category).map(&:original).should == ['array', 'of', 'similar']
end
it 'returns a list of tokens with the right categorization' do
- token.similar_tokens_for(@category).map(&:user_defined_categories).should == [[@category], [@category], [@category]]
+ token.similar_tokens_for(@category).map(&:predefined_categories).should == [[@category], [@category], [@category]]
end
end
context 'without similar' do
before(:each) do
@bundle = stub :bundle, :similar => []
@@ -145,23 +145,23 @@
end
end
it_should_qualify 'spec:qualifier', [['spec'], 'qualifier']
it_should_qualify 'with:qualifier', [['with'], 'qualifier']
it_should_qualify 'without qualifier', [nil, 'without qualifier']
- it_should_qualify 'name:', [nil, 'name']
+ it_should_qualify 'name:', [['name'], '']
it_should_qualify ':broken qualifier', [[], 'broken qualifier'] # Unsure about that. Probably should recognize it as text.
it_should_qualify '', [nil, '']
it_should_qualify 'sp:text', [['sp'], 'text']
it_should_qualify '""', [nil, '""']
- it_should_qualify 'name:', [nil, 'name']
+ it_should_qualify 'name:', [['name'], '']
it_should_qualify 'name:hanke', [['name'], 'hanke']
it_should_qualify 'g:gaga', [['g'], 'gaga']
it_should_qualify ':nothing', [[], 'nothing']
it_should_qualify 'hello', [nil, 'hello']
it_should_qualify 'a:b:c', [['a'], 'b:c']
it_should_qualify 'a,b:c', [['a','b'], 'c']
it_should_qualify 'a,b,c:d', [['a','b','c'], 'd']
- it_should_qualify ':', [nil, '']
+ it_should_qualify ':', [[], '']
it_should_qualify 'vorname:qualifier', [['vorname'], 'qualifier']
end
describe 'qualifier' do
it 'returns the right thing' do
\ No newline at end of file