Sha256: a73e30ef9d51e2032b6abb5331e49da7968f5ef241f0614d39bc34db79e4e5b3

Contents?: true

Size: 907 Bytes

Versions: 13

Compression:

Stored size: 907 Bytes

Contents

require 'spec_helper'

describe Indexed::Index do
  
  context "with categories" do
    before(:each) do
      @categories = stub :categories
      
      @index = Indexed::Index.new :some_name
      @index.define_category :some_category_name1
      @index.define_category :some_category_name2
      
      @index.stub! :categories => @categories
    end

    describe "load_from_cache" do
      it "delegates to each category" do
        @categories.should_receive(:load_from_cache).once.with
        
        @index.load_from_cache
      end
    end
    describe "possible_combinations" do
      it "delegates to the combinator" do
        @categories.should_receive(:possible_combinations_for).once.with :some_token
        
        @index.possible_combinations :some_token
      end
    end
  end
  
  context "no categories" do
    it "works" do
      Indexed::Index.new :some_name
    end
  end
  
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
picky-1.2.3 spec/lib/indexed/index_spec.rb
picky-1.2.2 spec/lib/indexed/index_spec.rb
picky-1.2.1 spec/lib/indexed/index_spec.rb
picky-1.2.0 spec/lib/indexed/index_spec.rb
picky-1.1.7 spec/lib/indexed/index_spec.rb
picky-1.1.6 spec/lib/indexed/index_spec.rb
picky-1.1.5 spec/lib/indexed/index_spec.rb
picky-1.1.4 spec/lib/indexed/index_spec.rb
picky-1.1.3 spec/lib/indexed/index_spec.rb
picky-1.1.2 spec/lib/indexed/index_spec.rb
picky-1.1.1 spec/lib/indexed/index_spec.rb
picky-1.1.0 spec/lib/indexed/index_spec.rb
picky-1.0.0 spec/lib/indexed/index_spec.rb