class RSpec::Mocks::MessageExpectation
def and_raise(exception = RuntimeError, message = nil)
- 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 self.terminal_implementation_action = Proc.new { raise exception } nil end