1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/rexml/formatter/test_default.rb

20 lines
455 B
Ruby
Raw Normal View History

require_relative "../rexml_test_utils"
module REXMLTests
class DefaultFormatterTest < Test::Unit::TestCase
def format(node)
formatter = REXML::Formatters::Default.new
output = ""
formatter.write(node, output)
output
end
class InstructionTest < self
def test_content_nil
instruction = REXML::Instruction.new("target")
assert_equal("<?target?>", format(instruction))
end
end
end
end