diff options
author | Geoff Buesing <gbuesing@gmail.com> | 2008-02-16 23:39:40 +0000 |
---|---|---|
committer | Geoff Buesing <gbuesing@gmail.com> | 2008-02-16 23:39:40 +0000 |
commit | 25e139e545f11c7764abe250f8f33d58874516d7 (patch) | |
tree | aadbd8b19c84cdfed0423cde3b6191eeeb7d88b5 /activesupport/test/core_ext/time_ext_test.rb | |
parent | e7ebd656b31244c3da5abf45e100c8e976c79d50 (diff) | |
download | rails-25e139e545f11c7764abe250f8f33d58874516d7.tar.gz rails-25e139e545f11c7764abe250f8f33d58874516d7.tar.bz2 rails-25e139e545f11c7764abe250f8f33d58874516d7.zip |
Time.=== returns true for TimeWithZone instances
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/test/core_ext/time_ext_test.rb')
-rw-r--r-- | activesupport/test/core_ext/time_ext_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/time_ext_test.rb b/activesupport/test/core_ext/time_ext_test.rb index 40e8c5ecfd..d4a555d55e 100644 --- a/activesupport/test/core_ext/time_ext_test.rb +++ b/activesupport/test/core_ext/time_ext_test.rb @@ -468,6 +468,12 @@ class TimeExtCalculationsTest < Test::Unit::TestCase end end + def test_case_equality + assert Time === Time.utc(2000) + assert Time === ActiveSupport::TimeWithZone.new(Time.utc(2000), TimeZone['UTC']) + assert_equal false, Time === DateTime.civil(2000) + end + protected def with_env_tz(new_tz = 'US/Eastern') old_tz, ENV['TZ'] = ENV['TZ'], new_tz |