diff options
Diffstat (limited to 'activesupport/test/core_ext/date_ext_test.rb')
-rw-r--r-- | activesupport/test/core_ext/date_ext_test.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/date_ext_test.rb b/activesupport/test/core_ext/date_ext_test.rb index 5e89a6e00b..ec47d0632c 100644 --- a/activesupport/test/core_ext/date_ext_test.rb +++ b/activesupport/test/core_ext/date_ext_test.rb @@ -353,6 +353,11 @@ class DateExtBehaviorTest < ActiveSupport::TestCase Date.today.freeze.freeze end end + + def test_compare_with_infinity + assert_equal(-1, Date.today <=> Float::INFINITY) + assert_equal(1, Date.today <=> -Float::INFINITY) + end end class DateExtConversionsTest < ActiveSupport::TestCase |