Sha256: ec7b085ae6b9b30cd6cc0b93243f3802d5345537388d78a50267570cc5f1993b

Contents?: true

Size: 741 Bytes

Versions: 1

Compression:

Stored size: 741 Bytes

Contents

# $Id: tc_xml_node2.rb,v 1.2 2006/02/21 20:40:16 roscopeco Exp $
require "#{File.dirname(__FILE__)}/../ext/xml/libxml" unless defined?(XML)
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

1 entries across 1 versions & 1 rubygems

Version Path
libxml-ruby-0.3.6 tests/tc_xml_node2.rb