spec/name_spec.rb in icu_name-1.0.16 vs spec/name_spec.rb in icu_name-1.1.0
- old
+ new
@@ -77,27 +77,21 @@
Name.new('pete', 'MACMANUS').last.should == "Macmanus"
end
it "characters and encoding" do
ICU::Name.new('éric', 'PRIÉ').name.should == "Éric Prié"
- ICU::Name.new('BARTŁOMIEJ', 'śliwa').name.should == "Bartłomiej Śliwa"
+ ICU::Name.new('BARTŁOMIEJ', 'śliwa').name.should == "Bartomiej Liwa"
ICU::Name.new('Սմբատ', 'Լպուտյան').name.should == ""
eric = Name.new('éric'.encode("ISO-8859-1"), 'PRIÉ'.force_encoding("ASCII-8BIT"))
eric.rname.should == "Prié, Éric"
eric.rname.encoding.name.should == "UTF-8"
eric.original.should == "PRIÉ, éric"
eric.original.encoding.name.should == "UTF-8"
eric.rname(:chars => "US-ASCII").should == "Prie, Eric"
eric.original(:chars => "US-ASCII").should == "PRIE, eric"
- joe = Name.new('Józef', 'Żabiński')
- joe.rname.should == "Żabiński, Józef"
- joe.rname(:chars => "ISO-8859-1").should == "Zabinski, Józef"
- joe.rname(:chars => "US-ASCII").should == "Zabinski, Jozef"
eric.match('Éric', 'Prié').should be_true
eric.match('Eric', 'Prie').should be_false
eric.match('Eric', 'Prie', :chars => "US-ASCII").should be_true
- joe.match('Józef', 'Zabinski').should be_false
- joe.match('Józef', 'Zabinski', :chars => "ISO-8859-1").should be_true
end
end
context "names that are already canonical" do
it "should not be altered" do