Sha256: 6b9a4a5a4cee4fcf0e205df3e9142aa67ca89f32fb5ae52c06503f288eda0ce2

Contents?: true

Size: 1000 Bytes

Versions: 13

Compression:

Stored size: 1000 Bytes

Contents

require 'spec_helper'

describe Picky::Bundle do

  before(:each) do
    @index    = Picky::Index.new :some_index
    @category = Picky::Category.new :some_category, @index
  end
  let(:bundle) do
    described_class.new :some_name,
                        @category,
                        Picky::Backends::Memory.new,
                        Picky::Generators::Weights::Default,
                        Picky::Generators::Partial::Default,
                        Picky::Generators::Similarity::DoubleMetaphone.new(3)
  end
  
  describe 'identifier' do
    it 'is correct' do
      bundle.identifier.should == 'test:some_index:some_category:some_name'
    end
  end
  
  describe 'index_path' do
    it 'is correct' do
      bundle.index_path(:some_type).should == 'spec/test_directory/index/test/some_index/some_category_some_name_some_type'
    end
    it 'is correct' do
      bundle.index_path.should == 'spec/test_directory/index/test/some_index/some_category_some_name'
    end
  end
  
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
picky-3.4.3 spec/lib/bundle_spec.rb
picky-3.4.2 spec/lib/bundle_spec.rb
picky-3.4.1 spec/lib/bundle_spec.rb
picky-3.4.0 spec/lib/bundle_spec.rb
picky-3.3.3 spec/lib/bundle_spec.rb
picky-3.3.2 spec/lib/bundle_spec.rb
picky-3.3.1 spec/lib/bundle_spec.rb
picky-3.3.0 spec/lib/bundle_spec.rb
picky-3.2.0 spec/lib/bundle_spec.rb
picky-3.1.13 spec/lib/bundle_spec.rb
picky-3.1.12 spec/lib/bundle_spec.rb
picky-3.1.11 spec/lib/bundle_spec.rb
picky-3.1.10 spec/lib/bundle_spec.rb