aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
diff options
context:
space:
mode:
authorGeoff Buesing <gbuesing@gmail.com>2008-01-23 18:49:54 +0000
committerGeoff Buesing <gbuesing@gmail.com>2008-01-23 18:49:54 +0000
commitcb8de22dfb7a6dd5cb5bdca0d38ae797925e89d7 (patch)
tree65c68554635c0a462b3318ccd0534d3d29d83508 /activesupport/test/core_ext
parentb2fa70a8e1a7a02873e54bb38abafabdd103476a (diff)
downloadrails-cb8de22dfb7a6dd5cb5bdca0d38ae797925e89d7.tar.gz
rails-cb8de22dfb7a6dd5cb5bdca0d38ae797925e89d7.tar.bz2
rails-cb8de22dfb7a6dd5cb5bdca0d38ae797925e89d7.zip
Time #in_current_time_zone and #change_time_zone_to_current return self when Time.zone is nil
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8708 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test/core_ext')
-rw-r--r--activesupport/test/core_ext/time_with_zone_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/test/core_ext/time_with_zone_test.rb b/activesupport/test/core_ext/time_with_zone_test.rb
index 5b0c0fd569..55f41e0715 100644
--- a/activesupport/test/core_ext/time_with_zone_test.rb
+++ b/activesupport/test/core_ext/time_with_zone_test.rb
@@ -170,8 +170,8 @@ uses_tzinfo 'TimeWithZoneTest' do
assert_equal 'Fri, 31 Dec 1999 14:00:00 HST -10:00', @dt.in_current_time_zone.inspect
end
with_time_zone nil do
- assert_equal 'Sat, 01 Jan 2000 00:00:00 UTC +00:00', @t.in_current_time_zone.inspect
- assert_equal 'Sat, 01 Jan 2000 00:00:00 UTC +00:00', @dt.in_current_time_zone.inspect
+ assert_equal @t, @t.in_current_time_zone
+ assert_equal @dt, @dt.in_current_time_zone
end
end
@@ -196,8 +196,8 @@ uses_tzinfo 'TimeWithZoneTest' do
assert_equal 'Sat, 01 Jan 2000 00:00:00 HST -10:00', @dt.change_time_zone_to_current.inspect
end
with_time_zone nil do
- assert_equal 'Sat, 01 Jan 2000 00:00:00 UTC +00:00', @t.change_time_zone_to_current.inspect
- assert_equal 'Sat, 01 Jan 2000 00:00:00 UTC +00:00', @dt.change_time_zone_to_current.inspect
+ assert_equal @t, @t.change_time_zone_to_current
+ assert_equal @dt, @dt.change_time_zone_to_current
end
end