method

and_raise

and_raise(exception=Exception)
public

Warning

When you pass an exception class, the MessageExpectation will raise an instance of it, creating it with new. If the exception class initializer requires any parameters, you must pass in an instance and not the class.