summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/assert.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/assert.rb b/test/assert.rb
index 9f576a84a..6d727e889 100644
--- a/test/assert.rb
+++ b/test/assert.rb
@@ -124,6 +124,13 @@ def assert_include(collection, obj, msg = nil)
assert_true(collection.include?(obj), msg, diff)
end
+def assert_not_include(collection, obj, msg = nil)
+ msg = "Expected #{collection.inspect} to not include #{obj.inspect}" unless msg
+ diff = " Collection: #{collection.inspect}\n" +
+ " Object: #{obj.inspect}"
+ assert_false(collection.include?(obj), msg, diff)
+end
+
def assert_raise(*exp)
ret = true
if $mrbtest_assert