Sha256: c6e361ceba5689a905381d8f27cd2ab7f4afb4f9eaf7a49195c5d0b5edf4640c
Contents?: true
Size: 592 Bytes
Versions: 2
Compression:
Stored size: 592 Bytes
Contents
require 'spec_helper' describe Fuzzily::String do def result(string) string.extend(described_class).trigrams end it 'splits strings into trigrams' do result('Paris').should == %w(**p *pa par ari ris) end it 'removes accents' do result('Montélimar').should == %w(**m *mo mon ont nte tel eli lim ima mar) end it 'handles multi word strings' do result('Le Mans').should == %w(**l *le le* e*m *ma man ans) end it 'removes symbols' do result('Besse-en-Chandesse').should == %w(**b *be bes ess sse se* e*e *en en* n*c *ch cha han and nde des) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fuzzily-0.0.3 | spec/fuzzily/trigram_spec.rb |
fuzzily-0.0.2 | spec/fuzzily/trigram_spec.rb |