# File test/core_test.rb, line 217 def test_document # Testing cloning source = "<element/>" doc = Document.new source doc2 = Document.new doc # Testing Root assert_equals doc.root.name.to_s, "element" # Testing String source source = @xsa_source doc = Document.new source assert_instance_of XMLDecl, doc.xml_decl assert_instance_of DocType, doc.doc_type assert_equals doc.version, "1.0" source = File.new( "benchmarks/dash.xml" ) doc = Document.new source assert_equal "content-2", doc.elements["//content-2"].name end