Flowdock
method

assert_block

Importance_1
Ruby latest stable (v1_9_3_392) - 0 notes - 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
Show source
Register or log in to add new notes.