Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added tests for comparsion operator for Range

  • Loading branch information...
commit 8b67a022ec8754e5dab8df2a8bbec37df61a5fc2 1 parent 66e0e42
@gazay gazay authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 activesupport/test/core_ext/range_ext_test.rb
View
12 activesupport/test/core_ext/range_ext_test.rb
@@ -41,6 +41,18 @@ def test_should_include_other_with_exlusive_end
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
Please sign in to comment.
Something went wrong with that request. Please try again.