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