Sha256: 5f194acf37c14d70b0f1e1e5981abc72167c3996190dee77b72b1c2ee5f8e8a5

Contents?: true

Size: 591 Bytes

Versions: 2

Compression:

Stored size: 591 Bytes

Contents

require "libxml"
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').set
    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

2 entries across 2 versions & 1 rubygems

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