Sha256: 973a6ffe2a8a498e9f5fc2a689cbd0c8e02b915d069e7e1b262aeab08840241c

Contents?: true

Size: 650 Bytes

Versions: 4

Compression:

Stored size: 650 Bytes

Contents

require File::join(File::dirname(__FILE__), 'test_helper')

IDENTIFY_FONT_RESPONSE =<<EOF

Font: Zapf-Dingbats
    family: Zapf Dingbats
    style: Normal
    stretch: Normal
    weight: 400
    glyphs: /System/Library/Fonts/ZapfDingbats.ttf

  Font: Zapfino
    family: Zapfino
    style: Italic
    stretch: Normal
    weight: 400
    glyphs: /Library/Fonts/Zapfino.ttf


EOF

class ParserTest < MiniTest::Unit::TestCase

  def test_parse_fonts
    parser = MojoMagick::Util::Parser.new
    parsed_fonts = parser.parse_fonts(IDENTIFY_FONT_RESPONSE)
    assert_equal parsed_fonts.length, 2
    assert_equal parsed_fonts[1].style, 'Italic'
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mojo_magick-0.5.6 test/parser_test.rb
mojo_magick-0.5.5 test/parser_test.rb
mojo_magick-0.5.4 test/parser_test.rb
mojo_magick-0.5.3 test/parser_test.rb