spec/unicode_emoji_spec.rb in unicode-emoji-0.9.0 vs spec/unicode_emoji_spec.rb in unicode-emoji-0.9.1

- old
+ new

@@ -290,6 +290,20 @@ it "returns any emoji-related codepoint (but no variation selectors or tags)" do matches = "1 string 😴\u{FE0F} sleeping face with 🇵 and modifier 🏾, also 🏴󠁧󠁢󠁳󠁣󠁴󠁿 Scotland".scan(Unicode::Emoji::REGEX_ANY) assert_equal ["1", "😴", "🇵", "🏾", "🏴"], matches end end + + describe ".list" do + it "returns a grouped list of emoji" do + assert_includes Unicode::Emoji.list.keys, "Smileys & People" + end + + it "sub-groups the list of emoji" do + assert_includes Unicode::Emoji.list("Smileys & People").keys, "face-positive" + end + + it "has emoji in sub-groups" do + assert_includes Unicode::Emoji.list("Smileys & People", "face-positive"), "😎" + end + end end