Sha256: 740c77ad526bee7c6806e9a09952f28aa99c6b24ab30c41de9afe5fe84c5f18e
Contents?: true
Size: 1.25 KB
Versions: 28
Compression:
Stored size: 1.25 KB
Contents
require 'spec_helper' describe Krikri::Enrichments::StripEndingPunctuation do it_behaves_like 'a field enrichment' values = [{ :string => 'removes punctuation from end of field', :start => "moomin!...!;,.", :end => "moomin" }, { :string => 'keeps initials', :start => "Smith, Smithy Q.", :end => "Smith, Smithy Q." }, { :string => 'keeps closing parentheses', :start => "(Smith)", :end => "(Smith)" }, { :string => 'keeps two letter abbreviations', :start => "66 cm.", :end => "66 cm." }, { :string => 'removes period from longer words', :start => "Regents Examinations.", :end => "Regents Examinations" }, { :string => 'removes period from longer words with parens', :start => "Budget - New York (State).", :end => "Budget - New York (State)" }, { :string => 'leaves other fields unaltered', :start => "moominpapa;:;:; moominmama", :end => "moominpapa;:;:; moominmama" }] it_behaves_like 'a string enrichment', values end
Version data entries
28 entries across 28 versions & 1 rubygems