Sha256: 96e1385750dd332f86d010a8bb023dc7637db6322d52e0d5d2575997c7717149

Contents?: true

Size: 937 Bytes

Versions: 61

Compression:

Stored size: 937 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/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

61 entries across 61 versions & 1 rubygems

Version Path
picky-3.6.11 spec/lib/bundle_spec.rb