* 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
This commit is contained in:
nobu 2010-04-29 03:16:24 +00:00
parent 55181301ae
commit 33cf9431da
2 changed files with 15 additions and 0 deletions

View file

@ -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