diff options
| author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-03 14:34:03 +0000 |
|---|---|---|
| committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-07-03 14:34:03 +0000 |
| commit | d8c38163e40ded483c2a658d6627929107077943 (patch) | |
| tree | 36d688561d634c08505e255a5e1743feb2c4f1f8 /test | |
| parent | f9dccbd56307c39fcad076763eaea5da7be231b7 (diff) | |
| download | ruby-d8c38163e40ded483c2a658d6627929107077943.tar.gz ruby-d8c38163e40ded483c2a658d6627929107077943.tar.xz ruby-d8c38163e40ded483c2a658d6627929107077943.zip | |
* test/wsdl/document/test_rpc.rb: compare formatted time string of
Time objects instead of comparing Time objects itself to avoid
unintended conflict of usec part. [ruby-dev:26220]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@8710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/wsdl/document/test_rpc.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/wsdl/document/test_rpc.rb b/test/wsdl/document/test_rpc.rb index 5dac10d58..56cd0677a 100644 --- a/test/wsdl/document/test_rpc.rb +++ b/test/wsdl/document/test_rpc.rb @@ -107,10 +107,13 @@ class TestRPC < Test::Unit::TestCase # struct#m_datetime in a response is a DateTime even though # struct#m_datetime in a request is a Time. + timeformat = "%Y-%m-%dT%H:%M:%S" assert_equal("mystring2", ret.struct1.m_string) - assert_equal(now2, date2time(ret.struct1.m_datetime)) + assert_equal(now2.strftime(timeformat), + date2time(ret.struct1.m_datetime).strftime(timeformat)) assert_equal("mystring1", ret.struct_2.m_string) - assert_equal(now1, date2time(ret.struct_2.m_datetime)) + assert_equal(now1.strftime(timeformat), + date2time(ret.struct_2.m_datetime).strftime(timeformat)) assert_equal("attr_string", ret.xmlattr_attr_string) assert_equal(5, ret.xmlattr_attr_int) end |
