Sha256: 4b2c054f04835c8fea715120b28280dd0163c2c16cc6986584485e57efd40704

Contents?: true

Size: 1023 Bytes

Versions: 15

Compression:

Stored size: 1023 Bytes

Contents

require 'spec_helper'

describe Picky::Category do
  
  let(:index) { Picky::Index.new :some_index }
  let(:category) { described_class.new :some_category, index }
  
  it 'should set defaults correctly' do
    category.indexing_exact.weights_strategy.should == Picky::Generators::Weights::Default
    category.indexing_exact.partial_strategy.should be_kind_of(Picky::Generators::Partial::None)
    category.indexing_exact.similarity_strategy.should == Picky::Generators::Similarity::Default
    
    category.indexing_partial.weights_strategy.should be_kind_of(Picky::Generators::Weights::Logarithmic)
    category.indexing_partial.partial_strategy.should == Picky::Generators::Partial::Default
    category.indexing_partial.similarity_strategy.should be_kind_of(Picky::Generators::Similarity::None)
    
    category.indexed_exact.similarity_strategy.should == Picky::Generators::Similarity::Default
    
    category.indexed_partial.similarity_strategy.should be_kind_of(Picky::Generators::Similarity::None)
  end
  
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
picky-3.2.0 spec/lib/category_spec.rb
picky-3.1.13 spec/lib/category_spec.rb
picky-3.1.12 spec/lib/category_spec.rb
picky-3.1.11 spec/lib/category_spec.rb
picky-3.1.10 spec/lib/category_spec.rb
picky-3.1.9 spec/lib/category_spec.rb
picky-3.1.8 spec/lib/category_spec.rb
picky-3.1.7 spec/lib/category_spec.rb
picky-3.1.6 spec/lib/category_spec.rb
picky-3.1.5 spec/lib/category_spec.rb
picky-3.1.4 spec/lib/category_spec.rb
picky-3.1.3 spec/lib/category_spec.rb
picky-3.1.2 spec/lib/category_spec.rb
picky-3.1.1 spec/lib/category_spec.rb
picky-3.1.0 spec/lib/category_spec.rb