spec/lib/query/indexes_spec.rb in picky-4.19.4 vs spec/lib/query/indexes_spec.rb in picky-4.19.5
- old
+ new
@@ -1,21 +1,21 @@
require 'spec_helper'
describe Picky::Query::Indexes do
before(:each) do
- Picky::Query::Indexes::Check.stub! :check_backends
+ Picky::Query::Indexes::Check.stub :check_backends
end
3.times do |i|
name = :"index#{i+1}"
let(name) { Picky::Index.new(name) }
end
let(:indexes) do
indexes = described_class.allocate
- indexes.stub! :map_categories
+ indexes.stub :map_categories
indexes.send :initialize, index1, index2, index3
indexes
end
describe 'expand_combinations_from' do
@@ -85,23 +85,23 @@
end
end
describe 'prepared_allocations_for' do
before(:each) do
- @allocations = stub :allocations
- indexes.stub! :allocations_for => @allocations
+ @allocations = double :allocations
+ indexes.stub :allocations_for => @allocations
end
it 'calls the right method in order' do
- # @allocations.should_receive(:uniq!).once.ordered.with()
+ # @allocations.should_receive(:uniq!).once.ordered.with no_args
@allocations.should_receive(:calculate_score).once.ordered.with(:some_weights)
- @allocations.should_receive(:sort!).once.ordered.with()
+ @allocations.should_receive(:sort!).once.ordered.with no_args
indexes.prepared_allocations_for :some_tokens, :some_weights
end
it 'calls the right method in order' do
- # @allocations.should_receive(:uniq!).once.ordered.with()
+ # @allocations.should_receive(:uniq!).once.ordered.with no_args
@allocations.should_receive(:calculate_score).once.ordered.with({})
- @allocations.should_receive(:sort!).once.ordered.with()
+ @allocations.should_receive(:sort!).once.ordered.with no_args
indexes.prepared_allocations_for :some_tokens
end
end
\ No newline at end of file