# File lib/rspec/mocks/message_expectation.rb, line 126 def and_raise(exception = RuntimeError, message = nil) if exception.respond_to?(:exception) exception = message ? exception.exception(message) : exception.exception end @implementation = Proc.new { raise exception } end