From d7a7d85dbdd2e13612affe48cca39aa48643944d Mon Sep 17 00:00:00 2001 From: Leon Breedt Date: Mon, 4 Apr 2005 22:58:02 +0000 Subject: * Fix casting of nested members in structured types if we have a signature type available for it even if they are already of the desired type as SOAP/XML-RPC unmarshaling may have gotten it wrong: SOAP likes to always use DateTime no matter what, for example, whereas we allow a distinction between Date, DateTime and Time in the signature for convenience casting * Fix raising of exceptions by test_invoke so functional tests fail properly on exception instead of returning the exception object * Fix Struct#each_pair to yield the value and not the member type git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionwebservice/test/struct_test.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'actionwebservice/test') diff --git a/actionwebservice/test/struct_test.rb b/actionwebservice/test/struct_test.rb index 838cc2569c..f689746ee4 100644 --- a/actionwebservice/test/struct_test.rb +++ b/actionwebservice/test/struct_test.rb @@ -44,11 +44,9 @@ class TC_Struct < Test::Unit::TestCase end def test_each_pair - members = {} - @struct.each_pair do |name, type| - members[name] = type - assert ActionWebService::BaseType === type + @struct.each_pair do |name, value| + assert_equal @struct.__send__(name), value + assert_equal @struct[name], value end - assert_equal members, Struct.members end end -- cgit v1.2.3