method

assert_block

v1_8_7_330 - Show latest stable - Class: Test::Unit::Assertions
assert_block(message="assert_block failed.")
public

The assertion upon which all other assertions are based. Passes if the block yields true.

Example:

assert_block "Couldn't do the thing" do
  do_the_thing
end