spec/functional/tokenizer_spec.rb in picky-4.6.0 vs spec/functional/tokenizer_spec.rb in picky-4.6.1

- old
+ new

@@ -5,17 +5,21 @@ describe Picky::Tokenizer do describe 'examples' do it 'works correctly' do tokenizer = described_class.new(split_words_on: /\&/, normalizes_words: [[/\&/, 'and']]) - # TODO Is this really correct? Shouldn't we split after normalizing? + # Is this really correct? Shouldn't we split after normalizing? # + # Yes – we split using more information. + # tokenizer.tokenize('M & M').should == [['m', 'and', 'm'], ['m', 'and', 'm']] end it 'works correctly' do tokenizer = described_class.new(stopwords: /\b(and)\b/, normalizes_words: [[/\&/, 'and']]) - # TODO Is this really correct? Shouldn't we stop words after normalizing? + # Is this really correct? Shouldn't we stop words after normalizing? + # + # Yes – we do stopwords using more information. # tokenizer.tokenize('M & M').should == [['m', 'and', 'm'], ['m', 'and', 'm']] end it 'removes all stopwords if they do not occur alone' do tokenizer = described_class.new(stopwords: /\b(and|then)\b/) \ No newline at end of file