class Spy::Subroutine
def and_raise(exception = RuntimeError, message = nil)
-
(self)
-
Other tags:
- Note: -
Overloads:
-
and_raise(exception_instance)
-
and_raise(ExceptionClass, message)
-
and_raise(ExceptionClass)
-
and_raise
def and_raise(exception = RuntimeError, message = nil) if exception.respond_to?(:exception) exception = message ? exception.exception(message) : exception.exception end @plan = Proc.new { raise exception } end