Sha256: d90ad7a227a91d1db777cea77c876f451c28b01491bcc53e018bdd2359c8e606

Contents?: true

Size: 685 Bytes

Versions: 1

Compression:

Stored size: 685 Bytes

Contents

# $Id: tc_xml_xpath.rb,v 1.2 2006/02/21 20:40:16 roscopeco Exp $
require "#{File.dirname(__FILE__)}/../ext/xml/libxml" unless defined?(XML)

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

1 entries across 1 versions & 1 rubygems

Version Path
libxml-ruby-0.3.6 tests/tc_xml_xpath.rb