Skip to content

and_raise has an additional message argument

gitlab-qa-bot requested to merge github/fork/basvodde/master into master

Created by: basvodde

Added a "message" argument to and_raise and also allow classes to be passed with one message argument. Decided to implement it after the discussion on the rspec list. Feel free to decline it or implement it different.

(an alternative implementation I made was to let and_raise create the instance. The advantage of this is that when the Exception class passed is invalid then the and_raise will fail and not the raise_exception. If this is preferred, then I can also make a pull request with that change)

Merge request reports