aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-05-07 13:01:58 -0700
committerXavier Noria <fxn@hashref.com>2012-05-07 13:01:58 -0700
commited2feb7962bd97c2222ba609bb01fe5165a597c8 (patch)
tree445e0f8f9efbaa5183c14ba50c85c6518b0ef404 /activesupport/test
parent7746bf9a71804a2994f4e5c37faa3075efe1aec2 (diff)
parentd785b292a8c921989f606696dff3765836d1fb44 (diff)
downloadrails-ed2feb7962bd97c2222ba609bb01fe5165a597c8.tar.gz
rails-ed2feb7962bd97c2222ba609bb01fe5165a597c8.tar.bz2
rails-ed2feb7962bd97c2222ba609bb01fe5165a597c8.zip
Merge pull request #6064 from gazay/fix_guides_for_as_core_ext
Fix guides for as core ext
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/range_ext_test.rb12
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