Sha256: 7d5eb0bb9c2ed894efb58b1490c75e0403243ea97ce0d305ae805b4d549ee41a

Contents?: true

Size: 560 Bytes

Versions: 2

Compression:

Stored size: 560 Bytes

Contents

require "test_helper"

class SymbolTest < Test::Unit::TestCase
  attr_reader :symbol

  should "require that its char property be 4 hexadecimal characters" do
    @symbol = Rocx::Elements::Symbol.new
    assert_raises ArgumentError do
      symbol.char = "not valid"
    end

    assert_nothing_raised do
      symbol.char = "43fd"
    end
  end

  should "output the right XML" do
    @symbol = Rocx::Elements::Symbol.new(char: "43fd", font: "Wingdings")
    xml = build_xml { |xml| symbol.to_xml(xml) }
    assert_equal element_xml("symbol"), xml
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rocx-0.5.7 test/elements/symbol_test.rb
rocx-0.5.6 test/elements/symbol_test.rb