Sha256: a4205e47119d0ed99eded16d8630056bb6463b58c935d0b6bf538ca48ae6db93
Contents?: true
Size: 569 Bytes
Versions: 4
Compression:
Stored size: 569 Bytes
Contents
require 'spec_helper' require 'support/nysiis_data' describe Phonetic::NYSIIS do describe '.encode' do it 'should return NYSIIS code of word' do Phonetic::NYSIIS_TEST_TABLE.each do |word, result| Phonetic::NYSIIS.encode(word, trim: false).should == result end end it 'should return empty string for empty word' do Phonetic::NYSIIS.encode('').should == '' end it 'should ignore non-english symbols in input' do Phonetic::NYSIIS.encode('1234567890+-= Bess $').should == 'BAS' end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
phonetic-1.2.0 | spec/phonetic/nysiis_spec.rb |
phonetic-1.1.0 | spec/phonetic/nysiis_spec.rb |
phonetic-1.0.1 | spec/phonetic/nysiis_spec.rb |
phonetic-1.0.0 | spec/phonetic/nysiis_spec.rb |