mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
20 lines
455 B
Ruby
20 lines
455 B
Ruby
|
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
|