method

assert_nothing_thrown

assert_nothing_thrown(msg=nil)
public

Fails if the given block uses a call to Kernel#throw, and returns the result of the block otherwise.

An optional failure message may be provided as the final argument.

assert_nothing_thrown "Something was thrown!" do
  throw :problem?
end