method
assert_throw
v2_1_10 -
Show latest stable
- Class:
Test::Unit::Assertions
assert_throw(tag, msg = nil)public
Fails unless the given block throws tag, returns the caught value otherwise.
An optional failure message may be provided as the final argument.
tag = Object.new assert_throw(tag, "#{tag} was not thrown!") do throw tag end