aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/time_zone_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/time_zone_test.rb')
-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