spec/unicode_name_spec.rb in unicode-name-1.3.0 vs spec/unicode_name_spec.rb in unicode-name-1.4.0

- old
+ new

@@ -11,17 +11,18 @@ it "works for CJK Ideographs" do assert_equal "CJK UNIFIED IDEOGRAPH-4E01", Unicode::Name.of("丁") end - # it "works for Hangul Syllables" do - # assert_equal "HANGUL SYLLABLE GAG", Unicode::Name.of("각") - # end + it "works for Hangul Syllables" do + assert_equal "HANGUL SYLLABLE HAN", Unicode::Name.of("한") + assert_equal "HANGUL SYLLABLE GAG", Unicode::Name.of("각") + end it "will return nil for characters without name" do - assert_equal nil, Unicode::Name.of("\u{10c50}") - assert_equal nil, Unicode::Name.of("\0") + assert_nil Unicode::Name.of("\u{10c50}") + assert_nil Unicode::Name.of("\0") end end describe ".correct" do it "usually just returns name" do @@ -33,11 +34,11 @@ end end describe ".aliases" do it "will return nil if no alias available" do - assert_equal nil, Unicode::Name.aliases("A") + assert_nil Unicode::Name.aliases("A") end it "will always return a Hash" do assert_equal Hash, Unicode::Name.aliases("\0").class end @@ -48,10 +49,10 @@ end end describe ".label" do it "will return nil for usual (graphic) characters" do - assert_equal nil, Unicode::Name.label("A") + assert_nil Unicode::Name.label("A") end it "will return <control-hhhh> for control characters" do assert_equal "<control-0000>", Unicode::Name.label("\0") end