From 4c10b035ef46165c1b9a42183c7744988a38138a Mon Sep 17 00:00:00 2001 From: mneumann Date: Thu, 2 Dec 2004 15:22:23 +0000 Subject: * 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 --- test/xmlrpc/test_parser.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'test/xmlrpc/test_parser.rb') diff --git a/test/xmlrpc/test_parser.rb b/test/xmlrpc/test_parser.rb index 9c91d3348d..44ca1f88b7 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 ---------------------------------------------------------------- -- cgit v1.2.3