class RSpec::Mocks::BaseExpectation
def and_raise(exception=Exception)
class initializer requires any parameters, you must pass in an
raise an instance of it, creating it with +new+. If the exception
When you pass an exception class, the MessageExpectation will
== Warning
and_raise(exception) #any exception object
and_raise(Exception) #any exception class
and_raise()
:call-seq:
def and_raise(exception=Exception) @exception_to_raise = exception end