spec/lib/query/tokens_spec.rb in picky-4.16.0 vs spec/lib/query/tokens_spec.rb in picky-4.17.0

- old
+ new

@@ -24,24 +24,24 @@ @token3 = stub :token3 @tokens = described_class.new [@token1, @token2, @token3], true end it 'should work correctly' do - @token1.should_receive(:possible_combinations_in).once.with(:some_index).and_return [:combination11, :combination12] - @token2.should_receive(:possible_combinations_in).once.with(:some_index).and_return [:combination21] - @token3.should_receive(:possible_combinations_in).once.with(:some_index).and_return [:combination31, :combination32, :combination33] + @token1.should_receive(:possible_combinations).once.with(:some_index).and_return [:combination11, :combination12] + @token2.should_receive(:possible_combinations).once.with(:some_index).and_return [:combination21] + @token3.should_receive(:possible_combinations).once.with(:some_index).and_return [:combination31, :combination32, :combination33] @tokens.possible_combinations_in(:some_index).should == [ [:combination11, :combination12], [:combination21], [:combination31, :combination32, :combination33] ] end it 'should work correctly' do - @token1.should_receive(:possible_combinations_in).once.with(:some_index).and_return [:combination11, :combination12] - @token2.should_receive(:possible_combinations_in).once.with(:some_index).and_return [] - @token3.should_receive(:possible_combinations_in).once.with(:some_index).and_return [:combination31, :combination32, :combination33] + @token1.should_receive(:possible_combinations).once.with(:some_index).and_return [:combination11, :combination12] + @token2.should_receive(:possible_combinations).once.with(:some_index).and_return [] + @token3.should_receive(:possible_combinations).once.with(:some_index).and_return [:combination31, :combination32, :combination33] @tokens.possible_combinations_in(:some_index).should == [ [:combination11, :combination12], [:combination31, :combination32, :combination33] ] @@ -169,23 +169,23 @@ @token3 = stub :token3 @tokens = described_class.new [@token1, @token2, @token3] end it 'should work correctly' do - @token1.should_receive(:possible_combinations_in).once.with(:some_index).and_return [:combination11, :combination12] - @token2.should_receive(:possible_combinations_in).once.with(:some_index).and_return [:combination21] - @token3.should_receive(:possible_combinations_in).once.with(:some_index).and_return [:combination31, :combination32, :combination33] + @token1.should_receive(:possible_combinations).once.with(:some_index).and_return [:combination11, :combination12] + @token2.should_receive(:possible_combinations).once.with(:some_index).and_return [:combination21] + @token3.should_receive(:possible_combinations).once.with(:some_index).and_return [:combination31, :combination32, :combination33] @tokens.possible_combinations_in(:some_index).should == [ [:combination11, :combination12], [:combination21], [:combination31, :combination32, :combination33] ] end it 'should work correctly' do - @token1.should_receive(:possible_combinations_in).once.with(:some_index).and_return [:combination11, :combination12] - @token2.should_receive(:possible_combinations_in).once.with(:some_index).and_return nil - @token3.should_receive(:possible_combinations_in).once.with(:some_index).and_return [:combination31, :combination32, :combination33] + @token1.should_receive(:possible_combinations).once.with(:some_index).and_return [:combination11, :combination12] + @token2.should_receive(:possible_combinations).once.with(:some_index).and_return nil + @token3.should_receive(:possible_combinations).once.with(:some_index).and_return [:combination31, :combination32, :combination33] @tokens.possible_combinations_in(:some_index).should == [ [:combination11, :combination12], nil, [:combination31, :combination32, :combination33] \ No newline at end of file