Sha256: b7f69ae7533890abbb0a149731481f9491d55698acdb2f30b42151161061cb87

Contents?: true

Size: 736 Bytes

Versions: 14

Compression:

Stored size: 736 Bytes

Contents

require 'spec_helper'

describe Internals::Indexing::Index do
  
  context "with categories" do
    before(:each) do
      @source = stub :some_source
      
      @categories = stub :categories
      
      @index = described_class.new :some_name, @source
      @index.define_category :some_category_name1
      @index.define_category :some_category_name2
      
      @index.stub! :categories => @categories
    end
    describe "generate_caches" do
      it "delegates to each category" do
        @categories.should_receive(:generate_caches).once.with
        
        @index.generate_caches
      end
    end
  end
  
  context "no categories" do
    it "works" do
      described_class.new :some_name, @source
    end
  end
  
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
picky-2.1.2 spec/lib/internals/indexing/index_spec.rb
picky-2.1.1 spec/lib/internals/indexing/index_spec.rb
picky-2.1.0 spec/lib/internals/indexing/index_spec.rb
picky-2.0.0 spec/lib/internals/indexing/index_spec.rb
picky-2.0.0.pre3 spec/lib/internals/indexing/index_spec.rb
picky-2.0.0.pre2 spec/lib/internals/indexing/index_spec.rb
picky-2.0.0.pre1 spec/lib/internals/indexing/index_spec.rb
picky-1.5.4 spec/lib/internals/indexing/index_spec.rb
picky-1.5.3 spec/lib/internals/indexing/index_spec.rb
picky-1.5.2 spec/lib/internals/indexing/index_spec.rb
picky-1.5.1 spec/lib/internals/indexing/index_spec.rb
picky-1.5.0 spec/lib/internals/indexing/index_spec.rb
picky-1.4.3 spec/lib/internals/indexing/index_spec.rb
picky-1.4.2 spec/lib/internals/indexing/index_spec.rb