aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorGeoff Buesing <gbuesing@gmail.com>2008-01-23 20:49:53 +0000
committerGeoff Buesing <gbuesing@gmail.com>2008-01-23 20:49:53 +0000
commit213fac6f49532e7ee08348542e80465088b9bf5d (patch)
tree955a7643f4559bf23cb20f00dfa0215c60ddaa72 /activesupport/test
parentcb8de22dfb7a6dd5cb5bdca0d38ae797925e89d7 (diff)
downloadrails-213fac6f49532e7ee08348542e80465088b9bf5d.tar.gz
rails-213fac6f49532e7ee08348542e80465088b9bf5d.tar.bz2
rails-213fac6f49532e7ee08348542e80465088b9bf5d.zip
TimeZone#now returns an ActiveSupport::TimeWithZone
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8710 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/time_zone_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/activesupport/test/time_zone_test.rb b/activesupport/test/time_zone_test.rb
index 8dea36f20e..72f25a1683 100644
--- a/activesupport/test/time_zone_test.rb
+++ b/activesupport/test/time_zone_test.rb
@@ -55,7 +55,10 @@ class TimeZoneTest < Test::Unit::TestCase
uses_mocha 'TestTimeZoneNowAndToday' do
def test_now
TZInfo::DataTimezone.any_instance.stubs(:now).returns(Time.utc(2000))
- assert_equal Time.utc(2000), TimeZone['Eastern Time (US & Canada)'].now
+ zone = TimeZone['Eastern Time (US & Canada)']
+ assert_instance_of ActiveSupport::TimeWithZone, zone.now
+ assert_equal Time.utc(2000), zone.now.time
+ assert_equal zone, zone.now.time_zone
end
def test_today