aboutsummaryrefslogtreecommitdiffstats
path: root/test/rexml/test_jaxen.rb
diff options
context:
space:
mode:
authorkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-17 13:31:16 +0000
committerkou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-09-17 13:31:16 +0000
commit146bf4fdafefc780d65f20c983d65f9cbe3bfe2d (patch)
tree4a738e18953b7bab6b063a7b1cc58cd668fbd974 /test/rexml/test_jaxen.rb
parentd357d7279ab23275b769b594a2c4670797afc353 (diff)
downloadruby-146bf4fdafefc780d65f20c983d65f9cbe3bfe2d.tar.gz
* 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
Diffstat (limited to 'test/rexml/test_jaxen.rb')
-rw-r--r--test/rexml/test_jaxen.rb10
1 files changed, 5 insertions, 5 deletions
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]