aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2011-10-03 10:53:09 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2011-10-03 10:53:09 -0700
commitc10fcd26376d9cdc4d4a27b66271ab33413ca18f (patch)
treec60802e88fdc81c145c6f53b1e7310cf76e645dc /activesupport/test
parente141cbdff5655004e358f0e96fa5b606b02b761a (diff)
parentda8f00a55c55bd4af152150b71823627a55bba5b (diff)
downloadrails-c10fcd26376d9cdc4d4a27b66271ab33413ca18f.tar.gz
rails-c10fcd26376d9cdc4d4a27b66271ab33413ca18f.tar.bz2
rails-c10fcd26376d9cdc4d4a27b66271ab33413ca18f.zip
Merge pull request #2801 from jeremyevans/patch-1
Fix obviously breakage of Time.=== for Time subclasses
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/time_ext_test.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/time_ext_test.rb b/activesupport/test/core_ext/time_ext_test.rb
index c4c4381957..ab9be4b18b 100644
--- a/activesupport/test/core_ext/time_ext_test.rb
+++ b/activesupport/test/core_ext/time_ext_test.rb
@@ -764,7 +764,10 @@ class TimeExtCalculationsTest < ActiveSupport::TestCase
def test_case_equality
assert Time === Time.utc(2000)
assert Time === ActiveSupport::TimeWithZone.new(Time.utc(2000), ActiveSupport::TimeZone['UTC'])
+ assert Time === Class.new(Time).utc(2000)
assert_equal false, Time === DateTime.civil(2000)
+ assert_equal false, Class.new(Time) === Time.utc(2000)
+ assert_equal false, Class.new(Time) === ActiveSupport::TimeWithZone.new(Time.utc(2000), ActiveSupport::TimeZone['UTC'])
end
def test_all_day