Added assert_true and assert_false same as test-unit gem
This commit is contained in:
parent
cf73cf5981
commit
c506ddac6c
@ -192,6 +192,22 @@ module Test
|
||||
assert obj.nil?, msg
|
||||
end
|
||||
|
||||
##
|
||||
# Fails unless +obj+ is true
|
||||
|
||||
def assert_true obj, msg = nil
|
||||
msg = message(msg) { "Expected #{mu_pp(obj)} to be true" }
|
||||
assert obj == true, msg
|
||||
end
|
||||
|
||||
##
|
||||
# Fails unless +obj+ is false
|
||||
|
||||
def assert_false obj, msg = nil
|
||||
msg = message(msg) { "Expected #{mu_pp(obj)} to be false" }
|
||||
assert obj == false, msg
|
||||
end
|
||||
|
||||
##
|
||||
# For testing with binary operators.
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user