Sha256: 85546e5f94a7c698e0b955b793d945933db0ffc9559b0c4995320913fdae665e

Contents?: true

Size: 550 Bytes

Versions: 21

Compression:

Stored size: 550 Bytes

Contents

# encoding: utf-8
#
require 'spec_helper'

describe Picky::Generators::Similarity::Metaphone do

  before(:each) do
    @similarity = described_class.new
  end

  describe 'default amount' do
    it 'is correct' do
      @similarity.amount.should == 3
    end
  end

  def self.it_should_encode text, expected
    it "should encode #{text.inspect} correctly" do
      @similarity.encode(text).should == expected
    end
  end

  it_should_encode :meier,       :MR
  it_should_encode :grossberger, :KRSBRJR
  it_should_encode :hadelbla,    :HTLBL

end

Version data entries

21 entries across 21 versions & 1 rubygems

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