method
assert_block
v2_1_10 -
Show latest stable
- Class:
Test::Unit::Assertions
assert_block(*msgs)public
Tests the result of the given block. If the block does not return true, the assertion will fail. The optional failure_message argument is the same as in Assertions#assert.
assert_block do [1, 2, 3].any? { |num| num < 1 } end