diff options
author | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-17 13:31:16 +0000 |
---|---|---|
committer | kou <kou@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-09-17 13:31:16 +0000 |
commit | 146bf4fdafefc780d65f20c983d65f9cbe3bfe2d (patch) | |
tree | 4a738e18953b7bab6b063a7b1cc58cd668fbd974 /test/rexml/test_contrib.rb | |
parent | d357d7279ab23275b769b594a2c4670797afc353 (diff) | |
download | ruby-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_contrib.rb')
-rw-r--r-- | test/rexml/test_contrib.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/rexml/test_contrib.rb b/test/rexml/test_contrib.rb index 1559f45a5b..54ec64299e 100644 --- a/test/rexml/test_contrib.rb +++ b/test/rexml/test_contrib.rb @@ -1,11 +1,13 @@ # coding: binary -require "test/unit/testcase" + +require "rexml_test_utils" require "rexml/document" require "rexml/parseexception" require "rexml/formatters/default" class ContribTester < Test::Unit::TestCase + include REXMLTestUtils include REXML XML_STRING_01 = <<DELIMITER @@ -275,7 +277,7 @@ EOF f.write( tn, Output.new(o = "", "ISO-8859-1") ) assert_equal(expected_iso, o.strip) - doc = Document.new File.new('test/data/xmlfile-bug.xml') + doc = Document.new File.new(fixture_path('xmlfile-bug.xml')) tn = XPath.first(doc, "//nebenspalte/text()[2]") assert_equal(expected_utf, tn.to_s.strip) f.write( tn, Output.new(o = "", "ISO-8859-1") ) @@ -295,7 +297,7 @@ EOF end def test_namespaces_in_attlist_tobias - in_string = File.open('test/data/foo.xml', 'r') do |file| + in_string = File.open(fixture_path('foo.xml'), 'r') do |file| file.read end @@ -309,7 +311,7 @@ EOF # Alun ap Rhisiart def test_less_than_in_element_content - source = File.new('test/data/ProductionSupport.xml') + source = File.new(fixture_path('ProductionSupport.xml')) h = Hash.new doc = REXML::Document.new source doc.elements.each("//CommonError") { |el| @@ -450,8 +452,8 @@ EOL def test_external_entity xp = '//channel/title' - %w{data/working.rss data/broken.rss}.each do |path| - File.open(File.join( "test", path )) do |file| + %w{working.rss broken.rss}.each do |path| + File.open(File.join(fixture_path(path))) do |file| doc = REXML::Document.new file.readlines.join('') # check to make sure everything is kosher |