Sha256: d37061666ce08837cc0dbc4d1628a74857a13b1a6db698a0664f838ba442d83c

Contents?: true

Size: 658 Bytes

Versions: 3

Compression:

Stored size: 658 Bytes

Contents

# $Id: tc_xml_node_set.rb 67 2006-04-17 13:30:22Z roscopeco $
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.5.0 tests/tc_xml_node_set.rb
libxml-ruby-0.5.0.1 tests/tc_xml_node_set.rb
libxml-ruby-0.5.1.0 tests/tc_xml_node_set.rb