summaryrefslogtreecommitdiff
path: root/test/date
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-10 22:57:01 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-10 22:57:01 +0000
commite8c67503ea26537762353d560d0b485fd40a77e7 (patch)
tree596f14575611f28724b89b6fbe5e207ac03d2f80 /test/date
parentfd93c804821a1ae21d7ad32bf97ad79023b57048 (diff)
* lib/date.rb (inspect): changed the format.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/date')
-rw-r--r--test/date/test_date.rb3
-rw-r--r--test/date/test_date_attr.rb4
2 files changed, 4 insertions, 3 deletions
diff --git a/test/date/test_date.rb b/test/date/test_date.rb
index 8cadb23..f2be9e2 100644
--- a/test/date/test_date.rb
+++ b/test/date/test_date.rb
@@ -41,8 +41,9 @@ class TestDate < Test::Unit::TestCase
assert_instance_of(DateSub, DateSub.today)
assert_instance_of(DateTimeSub, DateTimeSub.now)
- assert_equal('#<DateSub: -1/2,0,2299161>', d.inspect)
+ assert_equal('#<DateSub: -4712-01-01 (-1/2,0,2299161)>', d.inspect)
assert_equal('-4712-01-01', d.to_s)
+ assert_equal('#<DateTimeSub: -4712-01-01T00:00:00+00:00 (-1/2,0,2299161)>', dt.inspect)
assert_equal('-4712-01-01T00:00:00+00:00', dt.to_s)
d2 = d + 1
diff --git a/test/date/test_date_attr.rb b/test/date/test_date_attr.rb
index 2e71b5f..5187d5d 100644
--- a/test/date/test_date_attr.rb
+++ b/test/date/test_date_attr.rb
@@ -9,10 +9,10 @@ class TestDateAttr < Test::Unit::TestCase
[date, datetime].each_with_index do |d, i|
if i == 0
- assert_match(/\#<Date\d?: 4877807\/2,0,2299161>/,
+ assert_match(/\#<Date\d?: 1965-05-23 \(4877807\/2,0,2299161\)>/,
d.inspect)
else
- assert_match(/\#<DateTime\d?: 210721343519\/86400,0,2299161>/,
+ assert_match(/\#<DateTime\d?: 1965-05-23T22:31:59\+00:00 \(210721343519\/86400,0,2299161\)>/,
d.inspect)
end