Sha256: e7afbaf4ca00749679bf8616cdcd674b1dd468c02adf336771885442381f5bd0

Contents?: true

Size: 716 Bytes

Versions: 3

Compression:

Stored size: 716 Bytes

Contents

require 'spec_helper'

describe Indexing::Type do
  
  context "with categories" do
    before(:each) do
      @source = stub :some_source
      
      @categories = stub :categories
      
      @index = Indexing::Type.new :some_name, @source
      @index.add_category :some_category_name1
      @index.add_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
      Indexing::Type.new :some_name, @source
    end
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
picky-0.11.2 spec/lib/indexing/type_spec.rb
picky-0.11.1 spec/lib/indexing/type_spec.rb
picky-0.11.0 spec/lib/indexing/type_spec.rb