Sha256: ee2dce450b363b8abc22561c461119eb55cd5ade4caa99b54e75f0263ce1a639

Contents?: true

Size: 646 Bytes

Versions: 3

Compression:

Stored size: 646 Bytes

Contents

# $Id: tc_xml_xpath.rb 67 2006-04-17 13:30:22Z roscopeco $
require "libxml_test"
require "test/unit"

class TC_XML_XPath < 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)
    @xpt = doc.find('/ruby_array/fixnum').xpath
    assert_instance_of(XML::XPath, @xpt)
  end

  def teardown()
    @xpt = nil
  end

  def test_libxml_xpath_set()
    set = @xpt.set
    assert_instance_of(XML::Node::Set, set)    
  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_xpath.rb
libxml-ruby-0.5.0.1 tests/tc_xml_xpath.rb
libxml-ruby-0.5.1.0 tests/tc_xml_xpath.rb