Sha256: 2d9873b340ffb0b0ec48b66ed9e701c137a131a69ee56101cc14255af3cc8242
Contents?: true
Size: 914 Bytes
Versions: 4
Compression:
Stored size: 914 Bytes
Contents
# $Id: tc_xml_node7.rb 123 2006-11-27 10:41:14Z roscopeco $ require "libxml_test" require 'test/unit' class TC_XML_Node7 < Test::Unit::TestCase def setup() xp = XML::Parser.string('<ruby_array uga="booga" foo="bar"><fixnum>one</fixnum><fixnum>two</fixnum></ruby_array>') doc = xp.parse @root = doc.root assert_equal 'bar', @root['foo'] end def teardown() @root = nil end def test_xml_node_properties_traversal_bug() prop = @root.properties assert_instance_of XML::Attr, prop assert_equal 'uga', prop.name assert_equal 'booga', prop.value prop = prop.next assert_instance_of XML::Attr, prop assert_equal 'foo', prop.name assert_equal 'bar', prop.value end def test_xml_node_properties_when_no_attributes xp = XML::Parser.string("<root></root>") doc = xp.parse root = doc.root assert_nil root.properties end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
libxml-ruby-0.5.0 | tests/tc_xml_node7.rb |
libxml-ruby-0.5.0.1 | tests/tc_xml_node7.rb |
libxml-ruby-0.5.1.0 | tests/tc_xml_node7.rb |
libxml-ruby-0.5.2.0 | tests/tc_xml_node7.rb |