Sha256: da63215f7e5b9821c0994203207c2b512355c2339078011890667ff670e43815

Contents?: true

Size: 618 Bytes

Versions: 2

Compression:

Stored size: 618 Bytes

Contents

require "libxml"
require 'test/unit'

class TC_XML_Node2 < Test::Unit::TestCase
  def setup()
    xp = XML::Parser.new()
    str = '<ruby_array uga="booga" foo="bar"><fixnum>one</fixnum><fixnum>two</fixnum></ruby_array>'
    assert_equal(str, xp.string = str)
    doc = xp.parse
    assert_instance_of(XML::Document, doc)
    assert_instance_of(XML::Node, doc.root)
    @root = doc.root
    assert_instance_of(XML::Node, @root)
  end

  def teardown()
    @root = nil
  end

  def test_xml_node_doc_get()
    GC.start
    assert_instance_of(XML::Node, @root)
    assert_instance_of(XML::Document, @root.doc)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
libxml-ruby-0.5.3 test/tc_xml_node2.rb
libxml-ruby-0.5.4 test/tc_xml_node2.rb