You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
The first arg is matched against the exception object, supporting things like this.
The 2nd arg is matched against the exception message, supporting things like a_string_including(...).
Sometimes you only care about matching on the string, though. raise_error partially supports this by allowing you to pass a regex as the first argument. I think we should similarly support a matcher matching against the message as the first argument. Basically, we would change raise_error so that when it receives a single argument, it passes if that argument matches against either the exception object itself or the message.
raise_errorsupports composable matchers:a_string_including(...).Sometimes you only care about matching on the string, though.
raise_errorpartially supports this by allowing you to pass a regex as the first argument. I think we should similarly support a matcher matching against the message as the first argument. Basically, we would changeraise_errorso that when it receives a single argument, it passes if that argument matches against either the exception object itself or the message.