summaryrefslogtreecommitdiff
path: root/tool/lib/test/unit/assertions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tool/lib/test/unit/assertions.rb')
-rw-r--r--tool/lib/test/unit/assertions.rb20
1 files changed, 16 insertions, 4 deletions
diff --git a/tool/lib/test/unit/assertions.rb b/tool/lib/test/unit/assertions.rb
index 6345a625c1..b4f1dbc176 100644
--- a/tool/lib/test/unit/assertions.rb
+++ b/tool/lib/test/unit/assertions.rb
@@ -193,6 +193,22 @@ module Test
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.
#
# assert_operator 5, :<=, 4
@@ -547,10 +563,6 @@ module Test
assert yield, *msgs
end
- def assert_raises(*exp, &b)
- raise NoMethodError, "use assert_raise", caller
- end
-
# :call-seq:
# assert_nothing_thrown( failure_message = nil, &block )
#