Sha256: 8c715b6b7b3ebefe9633c4f6b040de9f47cf395115c3fd68a8c72a78016a888f

Contents?: true

Size: 917 Bytes

Versions: 57

Compression:

Stored size: 917 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::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/temp/index/test/some_index/some_category_some_name_some_type'
    end
    it 'is correct' do
      bundle.index_path.should == 'spec/temp/index/test/some_index/some_category_some_name'
    end
  end

end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
picky-4.31.3 spec/lib/bundle_spec.rb
picky-4.31.2 spec/lib/bundle_spec.rb
picky-4.31.1 spec/lib/bundle_spec.rb
picky-4.31.0 spec/lib/bundle_spec.rb
picky-4.30.0 spec/lib/bundle_spec.rb
picky-4.29.0 spec/lib/bundle_spec.rb
picky-4.28.1 spec/lib/bundle_spec.rb
picky-4.27.1 spec/lib/bundle_spec.rb
picky-4.27.0 spec/lib/bundle_spec.rb
picky-4.26.2 spec/lib/bundle_spec.rb
picky-4.26.1 spec/lib/bundle_spec.rb
picky-4.26.0 spec/lib/bundle_spec.rb
picky-4.25.3 spec/lib/bundle_spec.rb
picky-4.25.2 spec/lib/bundle_spec.rb
picky-4.25.1 spec/lib/bundle_spec.rb
picky-4.25.0 spec/lib/bundle_spec.rb
picky-4.24.0 spec/lib/bundle_spec.rb
picky-4.23.2 spec/lib/bundle_spec.rb
picky-4.23.1 spec/lib/bundle_spec.rb
picky-4.23.0 spec/lib/bundle_spec.rb