Skip to content

Commit

Permalink
Added tests for comparsion operator for Range
Browse files Browse the repository at this point in the history
  • Loading branch information
gazay committed May 7, 2012
1 parent 66e0e42 commit 8b67a02
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions activesupport/test/core_ext/range_ext_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b67a02

Please sign in to comment.