spec/unicode_age_spec.rb in unicode-age-1.1.0 vs spec/unicode_age_spec.rb in unicode-age-2.0.0.pre

- old
+ new

@@ -11,10 +11,12 @@ assert_equal 7.0, Unicode::Age.of("🛲 ") if RUBY_VERSION >= "2.2.0" assert_equal 8.0, Unicode::Age.of("🌮 ") if RUBY_VERSION >= "2.3.0" assert_equal 9.0, Unicode::Age.of("🛒 ") if RUBY_VERSION >= "2.4.0" end - it "returns nil for unassigned codepoints" do - assert_equal nil, Unicode::Age.of("\u{10FFFF}") + it "will raise Unicode::Age::UnknownAge exception for unassigned characters" do + assert_raises Unicode::Age::UnknownAge do + assert_equal nil, Unicode::Age.of("\u{10FFFF}") + end end end