Flowdock
throw_symbol(sym=nil) public

Given a Symbol argument, matches if a proc throws the specified Symbol.

Given no argument, matches if a proc throws any Symbol.

Examples

  lambda { do_something_risky }.should throw_symbol
  lambda { do_something_risky }.should throw_symbol(:that_was_risky)

  lambda { do_something_risky }.should_not throw_symbol
  lambda { do_something_risky }.should_not throw_symbol(:that_was_risky)
Show source
Register or log in to add new notes.