Sha256: c7c58e773831917a4698517993ed5c18b6908b9af0153bd4e5b5f27fe10a925d
Contents?: true
Size: 615 Bytes
Versions: 8
Compression:
Stored size: 615 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
8 entries across 8 versions & 1 rubygems