summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-29 03:16:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-29 03:16:24 +0000
commit33cf9431daf2d6e2c7bf9a8a6fa2530f1f8ffa2c (patch)
treec9ea1649096084228cd258ac38d49a1e9fa28eb2 /lib
parent55181301ae4f52678460b4eea5902b7cf15013ce (diff)
* lib/test/unit/assertions.rb (Test::Unit::Assertions#assert): reject
non-boolean values. [ruby-core:29868] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/test/unit/assertions.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/test/unit/assertions.rb b/lib/test/unit/assertions.rb
index 821faf5803..52d52012df 100644
--- a/lib/test/unit/assertions.rb
+++ b/lib/test/unit/assertions.rb
@@ -10,6 +10,16 @@ module Test
obj.pretty_inspect.chomp
end
+ def assert(result, *args, &b)
+ super(result == true || result == false, "assertion result must be true or false")
+ super
+ end
+
+ def refute(result, *args, &b)
+ super(result == true || result == false, "assertion result must be true or false")
+ super
+ end
+
def assert_raise(*args, &b)
assert_raises(*args, &b)
end