diff options
author | Alexey Gaziev <alex.gaziev@gmail.com> | 2012-04-30 01:14:52 +0400 |
---|---|---|
committer | Alexey Gaziev <alex.gaziev@gmail.com> | 2012-05-07 23:53:57 +0400 |
commit | 8b67a022ec8754e5dab8df2a8bbec37df61a5fc2 (patch) | |
tree | e76f61d5393e1f2119049851329006a0dca676da /activesupport/test | |
parent | 66e0e4216c55c29557a2789a96c3847a901ccb30 (diff) | |
download | rails-8b67a022ec8754e5dab8df2a8bbec37df61a5fc2.tar.gz rails-8b67a022ec8754e5dab8df2a8bbec37df61a5fc2.tar.bz2 rails-8b67a022ec8754e5dab8df2a8bbec37df61a5fc2.zip |
Added tests for comparsion operator for Range
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/core_ext/range_ext_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activesupport/test/core_ext/range_ext_test.rb b/activesupport/test/core_ext/range_ext_test.rb index cf1ec448c2..9c3389ba82 100644 --- a/activesupport/test/core_ext/range_ext_test.rb +++ b/activesupport/test/core_ext/range_ext_test.rb @@ -41,6 +41,18 @@ class RangeTest < ActiveSupport::TestCase assert((1..10).include?(1...10)) end + def test_should_compare_identical_inclusive + assert((1..10) === (1..10)) + end + + def test_should_compare_identical_exclusive + assert((1...10) === (1...10)) + end + + def test_should_compare_other_with_exlusive_end + assert((1..10) === (1...10)) + end + def test_exclusive_end_should_not_include_identical_with_inclusive_end assert !(1...10).include?(1..10) end |