From 146bf4fdafefc780d65f20c983d65f9cbe3bfe2d Mon Sep 17 00:00:00 2001 From: kou Date: Fri, 17 Sep 2010 13:31:16 +0000 Subject: * test/rexml/: fix fixture data path. All REXML tests are worked. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29284 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rexml/test_jaxen.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/rexml/test_jaxen.rb') diff --git a/test/rexml/test_jaxen.rb b/test/rexml/test_jaxen.rb index 47e631ee13..0d5396264b 100644 --- a/test/rexml/test_jaxen.rb +++ b/test/rexml/test_jaxen.rb @@ -1,11 +1,13 @@ +require 'rexml_test_utils' + require "rexml/document" require "rexml/xpath" -require 'test/unit/testcase' # Harness to test REXML's capabilities against the test suite from Jaxen # ryan.a.cox@gmail.com class JaxenTester < Test::Unit::TestCase + include REXMLTestUtils include REXML def test_axis ; test("axis") ; end @@ -32,19 +34,17 @@ class JaxenTester < Test::Unit::TestCase def test_web ; test("web") ; end def test_web2 ; test("web2") ; end + private def test( fname ) - xml_dir = "test/data" # Dir.entries( xml_dir ).each { |fname| # if fname =~ /\.xml$/ - file = File.new( File.join( xml_dir, fname+".xml" )) + file = File.new(fixture_path(fname+".xml")) doc = Document.new( file ) XPath.each( doc, "/tests/document" ) {|e| handleDocument(e)} # end # } end - private - # processes a tests/document/context node def handleContext( testDoc, ctxElement) testCtx = XPath.match( testDoc, ctxElement.attributes["select"] )[0] -- cgit v1.2.3