Sha256: 00eaf3dea8d60120c465070de97ac59fb67c484e764c31fbc5ba81b3c2557ae9

Contents?: true

Size: 664 Bytes

Versions: 3

Compression:

Stored size: 664 Bytes

Contents

# $Id: tc_xml_node_set.rb,v 1.3 2006/04/17 13:30:19 roscopeco Exp $
require "libxml_test"
require 'test/unit'

class TC_XML_Node_Set < 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)
    @set = doc.find('/ruby_array/fixnum')
    assert_instance_of(XML::Node::Set, @set)    
  end

  def teardown()
    @set = nil
  end

  def test_libxml_nodeset_each()
    @set.each do |n|
      assert_instance_of(XML::Node, n)
    end
  end
end # TC_XML_Document

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
libxml-ruby-0.3.8 tests/tc_xml_node_set.rb
libxml-ruby-0.3.8.2 tests/tc_xml_node_set.rb
libxml-ruby-0.3.8.4 tests/tc_xml_node_set.rb