Sha256: 5c9372f182a5df0e75aae8a1e04ec338df47ea0aa74f75dfd58b19c9f817e1be
Contents?: true
Size: 1.9 KB
Versions: 3
Compression:
Stored size: 1.9 KB
Contents
# $Id: tc_xml_document_write2.rb,v 1.3 2006/04/17 13:30:18 roscopeco Exp $ require "libxml_test" require 'test/unit' class TC_XML_Document_Write2 < Test::Unit::TestCase def setup() @doc = XML::Document.new('1.0') assert_instance_of(XML::Document, @doc) end def teardown() @doc = nil end def test_ruby_xml_document_write_root() xml = "<?xml version=\"1.0\"?>\n<rubynet/>\n" @doc.root = XML::Node.new('rubynet') assert_instance_of(XML::Node, @doc.root) assert_instance_of(XML::Document, @doc.root.doc) assert_equal(xml, @doc.to_s) end # def test_ruby_xml_document_write_root() def test_ruby_xml_document_write_root2() xml = "<?xml version=\"1.0\"?>\n<rubynet/>\n" @doc.root = XML::Node.new('rubynet') assert_instance_of(XML::Node, @doc.root) assert_instance_of(XML::Document, @doc.root.doc) assert_equal(xml, @doc.to_s(false)) end # def test_ruby_xml_document_write_root() def test_ruby_xml_document_write_root3() xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rubynet/>\n" @doc.root = XML::Node.new('rubynet') @doc.encoding = 'UTF-8' assert_instance_of(XML::Node, @doc.root) assert_instance_of(XML::Document, @doc.root.doc) assert_equal(xml, @doc.to_s) end # def test_ruby_xml_document_write_root() def test_ruby_xml_document_write_root4() xml = "<?xml version=\"1.0\"?>\n<rubynet/>\n" @doc.root = XML::Node.new('rubynet') assert_instance_of(XML::Node, @doc.root) assert_instance_of(XML::Document, @doc.root.doc) assert_equal(xml, @doc.to_s(false)) end # def test_ruby_xml_document_write_root() def test_ruby_xml_document_write_root5() xml = "<?xml version=\"1.0\"?>\n<rubynet/>\n" @doc.root = XML::Node.new('rubynet') assert_instance_of(XML::Node, @doc.root) assert_instance_of(XML::Document, @doc.root.doc) assert_equal(xml, @doc.to_s(true)) end # def test_ruby_xml_document_write_root() end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
libxml-ruby-0.3.8.4 | tests/tc_xml_document_write2.rb |
libxml-ruby-0.3.8.2 | tests/tc_xml_document_write2.rb |
libxml-ruby-0.3.8 | tests/tc_xml_document_write2.rb |