require 'test_helper'

describe Prawn::Emoji::Image do
  describe '#path' do
    def image_path_for(emoji)
      Prawn::Emoji::Image.new(emoji).path
    end

    it { image_path_for('😀').must_equal Prawn::Emoji.root.join('emoji', 'images', '1F600.png').to_s }
    it { image_path_for('©').must_equal Prawn::Emoji.root.join('emoji', 'images', '00A9.png').to_s }
  end
end

require 'test_helper'

describe Prawn::Emoji::Image do
  let(:emojis) { %w( 😀 © ) }

  it 'possible to find the image file' do
    emojis.each do |emoji|
      emoji_image = Prawn::Emoji::Image.new(emoji)

      assert File.exist?(emoji_image.path), "#{emoji}  not found"
    end
  end
end

Test for existence of emoji image file
Test for existence of emoji image file
