assert_raise(*args) public

Passes if the block raises one of the given exceptions.

Example:

  assert_raise RuntimeError, LoadError do
    raise 'Boom!!!'
  end
Show source
Register or log in to add new notes.
April 2, 2015
0 thanks

Typo

“Acceptable exception types maye be given as optional arguments. If the last argument is a String, it will be used as the error message.”

>

“Acceptable exception types may be given as optional arguments. If the last argument is a String, it will be used as the error message.”