spec/lib/internals/indexing/bundle/memory_spec.rb in picky-2.1.2 vs spec/lib/internals/indexing/bundle/memory_spec.rb in picky-2.2.0
- old
+ new
@@ -1,19 +1,18 @@
require 'spec_helper'
describe Internals::Indexing::Bundle::Memory do
before(:each) do
- @internal_index = stub :index, :name => :some_index
- @category = stub :category, :name => :some_category
- @configuration = Configuration::Index.new @internal_index, @category
+ @index = stub :index, :name => :some_index
+ @category = Internals::Indexing::Category.new :some_category, @index
@partial = stub :partial
@weights = stub :weights
@similarity = stub :similarity
end
- let(:index) { described_class.new :some_name, @configuration, @similarity, @partial, @weights }
+ let(:index) { described_class.new :some_name, @category, @similarity, @partial, @weights }
describe 'raise_cache_missing' do
it 'does something' do
expect {
index.raise_cache_missing :similarity
@@ -63,11 +62,11 @@
files = stub :files
files.should_receive(:retrieve).once.and_yield ' 1234', :some_token
index.stub! :files => files
@ary = stub :ary
- @internal_index.should_receive(:[]).any_number_of_times.and_return @ary
- index.stub! :index => @internal_index
+ @index.should_receive(:[]).any_number_of_times.and_return @ary
+ index.stub! :index => @index
end
context 'id key format' do
before(:each) do
index.should_receive(:[]).once.with(:key_format).and_return :to_i
end
\ No newline at end of file