Sha256: aa825ad6ca8eb5debf11b2b3c6077c9004c4f4bc1a0cff119837b3ebe8e407de

Contents?: true

Size: 588 Bytes

Versions: 5

Compression:

Stored size: 588 Bytes

Contents

require "xml"
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

5 entries across 5 versions & 4 rubygems

Version Path
libxml-jruby-modified-1.0.2-jruby test/tc_node_set.rb
libxml-jruby-modified-1.0.1-jruby test/tc_node_set.rb
libxml-fixed-jruby-1.0.0-jruby test/tc_node_set.rb
libxml-jruby-fixed-1.0.0-jruby test/tc_node_set.rb
libxml-jruby-1.0.0 test/tc_node_set.rb