From 25e139e545f11c7764abe250f8f33d58874516d7 Mon Sep 17 00:00:00 2001 From: Geoff Buesing Date: Sat, 16 Feb 2008 23:39:40 +0000 Subject: Time.=== returns true for TimeWithZone instances git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/core_ext/time_ext_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activesupport/test') 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 -- cgit v1.2.3