Sha256: dfad2a15807760c1c56a1c3f974103fb7c8a0b50de3f9ae6b064904466e4e2fd

Contents?: true

Size: 804 Bytes

Versions: 53

Compression:

Stored size: 804 Bytes

Contents

require 'spec_helper'

describe Cacher::SimilarityGenerator do

  context 'integration' do
    it 'should generate the correct values' do
      generator = Cacher::SimilarityGenerator.new :anything_really

      generator.generate.should == {}
    end
    it 'should generate the correct values with a given strategy' do
      generator = Cacher::SimilarityGenerator.new :meier => nil,
                                                  :maier => nil,
                                                  :mayer => nil,
                                                  :meyer => nil,
                                                  :peter => nil

      generator.generate(Cacher::Similarity::DoubleLevenshtone.new).should == { :MR => [:meier, :maier, :mayer, :meyer], :PTR => [:peter] }
    end
  end

end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
picky-1.4.1 spec/lib/cacher/similarity_generator_spec.rb
picky-1.4.0 spec/lib/cacher/similarity_generator_spec.rb
picky-1.3.4 spec/lib/cacher/similarity_generator_spec.rb
picky-1.3.3 spec/lib/cacher/similarity_generator_spec.rb
picky-1.3.2 spec/lib/cacher/similarity_generator_spec.rb
picky-1.3.1 spec/lib/cacher/similarity_generator_spec.rb
picky-1.3.0 spec/lib/cacher/similarity_generator_spec.rb
picky-1.2.4 spec/lib/cacher/similarity_generator_spec.rb
picky-1.2.3 spec/lib/cacher/similarity_generator_spec.rb
picky-1.2.2 spec/lib/cacher/similarity_generator_spec.rb
picky-1.2.1 spec/lib/cacher/similarity_generator_spec.rb
picky-1.2.0 spec/lib/cacher/similarity_generator_spec.rb
picky-1.1.7 spec/lib/cacher/similarity_generator_spec.rb
picky-1.1.6 spec/lib/cacher/similarity_generator_spec.rb
picky-1.1.5 spec/lib/cacher/similarity_generator_spec.rb
picky-1.1.4 spec/lib/cacher/similarity_generator_spec.rb
picky-1.1.3 spec/lib/cacher/similarity_generator_spec.rb
picky-1.1.2 spec/lib/cacher/similarity_generator_spec.rb
picky-1.1.1 spec/lib/cacher/similarity_generator_spec.rb
picky-1.1.0 spec/lib/cacher/similarity_generator_spec.rb