Sha256: 8a82ed0c3925706caaff33642f68e758df12e2d21f5a803b0857d2a2212678a6
Contents?: true
Size: 861 Bytes
Versions: 5
Compression:
Stored size: 861 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' describe Nameable::Latin do describe "with 'Mr. Chris Horn PhD" do subject { Nameable::Latin.new.parse("Mr. Chris Horn PhD") } it("should extract prefix") { subject.prefix.should == "Mr." } it("should extract first name") { subject.first.should == "Chris" } it("should extract last name") { subject.last.should == "Horn" } it("should extract and normalize suffix") { subject.suffix.should == "Ph.D." } end describe "with 'Chris Old Biscuit Barrel Horn'" do subject { Nameable::Latin.new.parse("Chris Old Biscuit Barrel Horn") } it("should extract first name") { subject.first.should == "Chris" } it("should extract middle name") { subject.middle.should == "Old Biscuit Barrel" } it("should extract last name") { subject.last.should == "Horn" } end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
nameable-0.5.0 | spec/nameable_spec.rb |
nameable-0.4.2 | spec/nameable_spec.rb |
nameable-0.4.1 | spec/nameable_spec.rb |
nameable-0.4.0 | spec/nameable_spec.rb |
nameable-0.3.0 | spec/nameable_spec.rb |