spec/lib/internals/tokenizers/query_spec.rb in picky-2.0.0 vs spec/lib/internals/tokenizers/query_spec.rb in picky-2.1.0

- old
+ new

@@ -39,10 +39,11 @@ describe 'preprocess' do it 'should call methods in order' do text = stub :text + tokenizer.should_receive(:substitute_characters).once.with(text).and_return text tokenizer.should_receive(:remove_illegals).once.ordered.with text tokenizer.should_receive(:remove_non_single_stopwords).once.ordered.with text tokenizer.preprocess text end @@ -55,17 +56,11 @@ describe 'process' do before(:each) do @tokens = mock :tokens, :null_object => true end - it 'should tokenize the tokens' do - @tokens.should_receive(:tokenize_with).once.with tokenizer - - tokenizer.process @tokens - end it 'should call methods on the tokens in order' do - @tokens.should_receive(:tokenize_with).once.ordered @tokens.should_receive(:reject).once.ordered @tokens.should_receive(:cap).once.ordered @tokens.should_receive(:partialize_last).once.ordered tokenizer.process @tokens @@ -118,17 +113,9 @@ it "should return an Array of tokens" do tokenizer.tokenize('test test').to_a.should be_instance_of(Array) end it "should return an empty tokenized query if the query string is blank or empty" do tokenizer.tokenize('').map(&:to_s).should == [] - end - end - describe "token_for" do - it "should get a preprocessed token" do - text = stub(:text) - Internals::Query::Token.should_receive(:processed).with text - - tokenizer.token_for text end end end \ No newline at end of file