summaryrefslogtreecommitdiff
path: root/test/xmlrpc/test_parser.rb
diff options
context:
space:
mode:
authormneumann <mneumann@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-02 15:22:23 +0000
committermneumann <mneumann@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-12-02 15:22:23 +0000
commit4c10b035ef46165c1b9a42183c7744988a38138a (patch)
treee33e8558593289b4782cab988a9a75e75075d7f8 /test/xmlrpc/test_parser.rb
parent5847fadf7b173479fca0521b2301e6ff89cbd09a (diff)
* test/xmlrpc/test_parser.rb, test/xmlrpc/data/*.expected: Expected
values are now stored in YAML instead of using #inspect. This fixes false hash order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/xmlrpc/test_parser.rb')
-rw-r--r--test/xmlrpc/test_parser.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/xmlrpc/test_parser.rb b/test/xmlrpc/test_parser.rb
index 9c91d3348d6..44ca1f88b74 100644
--- a/test/xmlrpc/test_parser.rb
+++ b/test/xmlrpc/test_parser.rb
@@ -1,6 +1,7 @@
require 'test/unit'
require 'xmlrpc/datetime'
require "xmlrpc/parser"
+require 'yaml'
module GenericParserTest
def datafile(base)
@@ -8,7 +9,7 @@ module GenericParserTest
end
def load_data(name)
- [File.read(datafile(name) + ".xml"), File.read(datafile(name) + ".expected").chomp]
+ [File.read(datafile(name) + ".xml"), YAML.load(File.read(datafile(name) + ".expected"))]
end
def setup
@@ -28,19 +29,19 @@ module GenericParserTest
# test parseMethodResponse --------------------------------------------------
def test_parseMethodResponse1
- assert_equal(@expected1, @p.parseMethodResponse(@xml1).inspect)
+ assert_equal(@expected1, @p.parseMethodResponse(@xml1))
end
def test_parseMethodResponse2
- assert_equal(@expected2, @p.parseMethodResponse(@xml2).inspect)
+ assert_equal(@expected2, @p.parseMethodResponse(@xml2))
end
def test_parseMethodResponse3
- assert_equal(@expected3, @p.parseMethodResponse(@xml3).inspect)
+ assert_equal(@expected3, @p.parseMethodResponse(@xml3))
end
def test_cdata
- assert_equal(@cdata_expected, @p.parseMethodResponse(@cdata_xml).inspect)
+ assert_equal(@cdata_expected, @p.parseMethodResponse(@cdata_xml))
end
def test_dateTime
@@ -50,7 +51,7 @@ module GenericParserTest
# test parseMethodCall ------------------------------------------------------
def test_parseMethodCall
- assert_equal(@expected4, @p.parseMethodCall(@xml4).inspect)
+ assert_equal(@expected4, @p.parseMethodCall(@xml4))
end
# test fault ----------------------------------------------------------------