summaryrefslogtreecommitdiff
path: root/test/rexml/test_order.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_order.rb
parentd357d7279ab23275b769b594a2c4670797afc353 (diff)
* 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_order.rb')
-rw-r--r--test/rexml/test_order.rb31
1 files changed, 16 insertions, 15 deletions
diff --git a/test/rexml/test_order.rb b/test/rexml/test_order.rb
index d694ee3..db1698f 100644
--- a/test/rexml/test_order.rb
+++ b/test/rexml/test_order.rb
@@ -1,8 +1,22 @@
-require 'test/unit'
+require 'rexml_test_utils'
require 'rexml/document'
require 'zlib'
class OrderTester < Test::Unit::TestCase
+ include REXMLTestUtils
+
+ TESTDOC = <<END
+<a>
+ <b/>
+ <x id='1'/>
+ <c/>
+ <d>
+ <x id='2'/>
+ </d>
+ <x id='3'/>
+</a>
+END
+
def setup
@doc = REXML::Document.new(TESTDOC)
@items = REXML::XPath.match(@doc,'//x')
@@ -29,7 +43,7 @@ class OrderTester < Test::Unit::TestCase
end
# Provided by Tom Talbott
def test_more_ordering
- doc = REXML::Document.new( Zlib::GzipReader.new( File.new( 'test/data/LostineRiver.kml.gz' ) ) )
+ doc = REXML::Document.new(Zlib::GzipReader.new(File.new(fixture_path('LostineRiver.kml.gz'))))
actual = [
"Head south from Phinney Ave N",
"Turn left at N 36th St",
@@ -86,16 +100,3 @@ class OrderTester < Test::Unit::TestCase
}
end
end
-
-TESTDOC = <<END
-<a>
- <b/>
- <x id='1'/>
- <c/>
- <d>
- <x id='2'/>
- </d>
- <x id='3'/>
-</a>
-END
-