Sha256: 7db903f1057cbdb4534c2609b3cb561c2a1b278c7bdf3955d7985138b3a56cb1
Contents?: true
Size: 1.34 KB
Versions: 3
Compression:
Stored size: 1.34 KB
Contents
require 'test_helper' class TestXmlModifiers < Test::Unit::TestCase context "A namespaced document" do setup do # choose xml file # xml_file = "namespaces.xml" # xml_file = "rss1.xml" # xml_file = "rubynet.xml" # xml_file = "shiporder.xml" xml_file = "soap_manufacturer_names_response.xml" # xml_file = "soap_create_reservation_response.xml" # Load xml file xml_file = File.join(File.dirname(__FILE__), "xml", xml_file) assert ! xml_file.nil? # doc_str = File.open( xml_file, "rb").read # @doc = doc_str.to_xmldoc @doc = XML::Document.file xml_file assert ! @doc.nil? # Remove namespaces @doc.strip! end should "strip all namespaces from a document" do assert ! @doc.strip!.nil? end end context "a partially namespaced document" do setup do # Insert the root node of a namespaced document into a stripped document end # should "replace a node within a document" do # assert ! @doc.strip!.nil? # end # should "replace a node which is the root node of the document" do # assert ! @doc.strip!.nil? # end end context "a stripped document" do should "strip all namespaces from a node" do @doc.node["/"] assert ! @node.strip!.nil? end end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
dreamcat4-libxml-bindings-0.2.0 | test/test_xml_modifiers.rb |
dreamcat4-libxml-bindings-0.2.1 | test/test_xml_modifiers.rb |
libxml4r-0.2.6 | test/test_xml_modifiers.rb |