Sha256: 208849fa40f3b9a151a705ed83303e02051b87139d94ae53700d8ed87c99701d

Contents?: true

Size: 989 Bytes

Versions: 7

Compression:

Stored size: 989 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 == '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

7 entries across 7 versions & 1 rubygems

Version Path
picky-3.6.1 spec/lib/bundle_spec.rb
picky-3.6.0 spec/lib/bundle_spec.rb
picky-3.5.4 spec/lib/bundle_spec.rb
picky-3.5.3 spec/lib/bundle_spec.rb
picky-3.5.2 spec/lib/bundle_spec.rb
picky-3.5.1 spec/lib/bundle_spec.rb
picky-3.5.0 spec/lib/bundle_spec.rb