-
Notifications
You must be signed in to change notification settings - Fork 49
/
bundle_spec.rb
32 lines (27 loc) · 917 Bytes
/
bundle_spec.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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