diff options
author | gsphanikumar <gsphanikumar@gmail.com> | 2012-12-22 21:46:42 +0530 |
---|---|---|
committer | Dan Kubb <dan.kubb@gmail.com> | 2013-01-13 20:27:42 -0800 |
commit | b1a501e6fb36e8dd16ceeaa2f9575e762a227a6d (patch) | |
tree | 70a1f76a5c732f80607d7446681bc630539c6c29 /activesupport/test | |
parent | 688d52933a2e611175f3d41c016cf0ba71450b17 (diff) | |
download | rails-b1a501e6fb36e8dd16ceeaa2f9575e762a227a6d.tar.gz rails-b1a501e6fb36e8dd16ceeaa2f9575e762a227a6d.tar.bz2 rails-b1a501e6fb36e8dd16ceeaa2f9575e762a227a6d.zip |
Test to allow Range including DateTime and DateTime::Infinity
Closes #8587
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)) |