aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/range_ext_test.rb
diff options
context:
space:
mode:
authorMichael Grosser <michael@grosser.it>2016-09-16 09:44:05 -0700
committerMichael Grosser <michael@grosser.it>2016-09-16 12:03:37 -0700
commita9aed2ac94d2e0d1a233a3c193985ae78d7e79e9 (patch)
treed550056dbf4a70b5c7562f1a715045c5a3968b0c /activesupport/test/core_ext/range_ext_test.rb
parentf62451a50b2c9119adce7acc53ce3dfffc4d41d5 (diff)
downloadrails-a9aed2ac94d2e0d1a233a3c193985ae78d7e79e9.tar.gz
rails-a9aed2ac94d2e0d1a233a3c193985ae78d7e79e9.tar.bz2
rails-a9aed2ac94d2e0d1a233a3c193985ae78d7e79e9.zip
improve error message when include assertions fail
assert [1, 3].includes?(2) fails with unhelpful "Asserting failed" message assert_includes [1, 3], 2 fails with "Expected [1, 3] to include 2" which makes it easier to debug and more obvious what went wrong
Diffstat (limited to 'activesupport/test/core_ext/range_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/range_ext_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activesupport/test/core_ext/range_ext_test.rb b/activesupport/test/core_ext/range_ext_test.rb
index 25e6693e4d..fc0e72e09a 100644
--- a/activesupport/test/core_ext/range_ext_test.rb
+++ b/activesupport/test/core_ext/range_ext_test.rb
@@ -66,15 +66,15 @@ class RangeTest < ActiveSupport::TestCase
end
def test_exclusive_end_should_not_include_identical_with_inclusive_end
- assert !(1...10).include?(1..10)
+ assert_not_includes (1...10), 1..10
end
def test_should_not_include_overlapping_first
- assert !(2..8).include?(1..3)
+ assert_not_includes (2..8), 1..3
end
def test_should_not_include_overlapping_last
- assert !(2..8).include?(5..9)
+ assert_not_includes (2..8), 5..9
end
def test_should_include_identical_exclusive_with_floats