diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-14 03:32:34 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-14 03:32:34 -0800 |
commit | 79a98d82daf3614f7e17b1436005cf3b10e83557 (patch) | |
tree | 70a1f76a5c732f80607d7446681bc630539c6c29 /activesupport/test | |
parent | 7c62a752db77af1aec57ccd4822e87cd6fd633b6 (diff) | |
parent | b1a501e6fb36e8dd16ceeaa2f9575e762a227a6d (diff) | |
download | rails-79a98d82daf3614f7e17b1436005cf3b10e83557.tar.gz rails-79a98d82daf3614f7e17b1436005cf3b10e83557.tar.bz2 rails-79a98d82daf3614f7e17b1436005cf3b10e83557.zip |
Merge pull request #8927 from dkubb/issue-8178
Fix DateTime comparison with DateTime::Infinity object
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/range_ext_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/range_ext_test.rb b/activesupport/test/core_ext/range_ext_test.rb index 360c97031c..e9734652bc 100644 --- a/activesupport/test/core_ext/range_ext_test.rb +++ b/activesupport/test/core_ext/range_ext_test.rb @@ -12,6 +12,12 @@ class RangeTest < Test::Unit::TestCase date_range = Time.utc(2005, 12, 10, 15, 30)..Time.utc(2005, 12, 10, 17, 30) assert_equal "BETWEEN '2005-12-10 15:30:00' AND '2005-12-10 17:30:00'", date_range.to_s(:db) end + + def test_date_range + assert_instance_of Range, DateTime.new..DateTime.new + assert_instance_of Range, DateTime::Infinity.new..DateTime::Infinity.new + assert_instance_of Range, DateTime.new..DateTime::Infinity.new + end def test_overlaps_last_inclusive assert((1..5).overlaps?(5..10)) |