diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-29 03:16:24 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-29 03:16:24 +0000 |
commit | 33cf9431daf2d6e2c7bf9a8a6fa2530f1f8ffa2c (patch) | |
tree | c9ea1649096084228cd258ac38d49a1e9fa28eb2 /lib/test/unit/assertions.rb | |
parent | 55181301ae4f52678460b4eea5902b7cf15013ce (diff) | |
download | ruby-33cf9431daf2d6e2c7bf9a8a6fa2530f1f8ffa2c.tar.gz |
* 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/test/unit/assertions.rb')
-rw-r--r-- | lib/test/unit/assertions.rb | 10 |
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 |