diff options
Diffstat (limited to 'activesupport/test/core_ext/date_time_ext_test.rb')
-rw-r--r-- | activesupport/test/core_ext/date_time_ext_test.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/date_time_ext_test.rb b/activesupport/test/core_ext/date_time_ext_test.rb index dfad3a90f8..54bbdbb18f 100644 --- a/activesupport/test/core_ext/date_time_ext_test.rb +++ b/activesupport/test/core_ext/date_time_ext_test.rb @@ -317,3 +317,10 @@ class DateTimeExtCalculationsTest < ActiveSupport::TestCase old_tz ? ENV['TZ'] = old_tz : ENV.delete('TZ') end end + +class DateTimeExtBehaviorTest < ActiveSupport::TestCase + def test_compare_with_infinity + assert_equal(-1, DateTime.now <=> Float::INFINITY) + assert_equal(1, DateTime.now <=> -Float::INFINITY) + end +end |