Flowdock
method

assert_block

Importance_1
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
Show source
Register or log in to add new notes.