Sha256: 59dd4bfbd080580731a511d881e342a0dc53f84943dc62ea39b4135372110d2d
Contents?: true
Size: 866 Bytes
Versions: 13
Compression:
Stored size: 866 Bytes
Contents
# encoding: UTF-8 require 'gemojione/string_ext' describe String, 'with Emoji extensions' do describe '#with_emoji_images' do it 'should replace unicode moji with an img tag' do base_string = "I ❤ Emoji" replaced_string = base_string.with_emoji_images assert_equal "I <img alt=\"❤\" class=\"emoji\" src=\"http://localhost:3000/2764.png\"> Emoji", replaced_string end end describe '#image_url' do it 'should generate image_url' do assert_equal 'http://localhost:3000/1F300.png', '🌀'.image_url assert_equal 'http://localhost:3000/1F300.png', 'cyclone'.image_url end end describe '#emoji_data' do it 'should find data for a name or a moji' do data_from_moji = '❤'.emoji_data data_from_string = 'heart'.emoji_data assert_equal data_from_moji, data_from_string end end end
Version data entries
13 entries across 13 versions & 1 rubygems