1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nahi 2005-07-03 14:34:03 +00:00
parent c61dd961dd
commit 6add2a6a77
2 changed files with 11 additions and 2 deletions

View file

@ -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