Added example for custom expectation-fail message in docs#486
Added example for custom expectation-fail message in docs#486
Conversation
jgebal
left a comment
There was a problem hiding this comment.
Hi @pesse ,
Can you update the Concepts section?
The syntax should include 'message' as an optional parameter.
I think that the whole section you are proposing to add, could go as sup-section under the Concepts.
Please change the error to failure.
Thanks for the contribution. It's a nice addition to the documentation.
| ``` | ||
| Since NULL is neither *true* nor *not true*, both expectations will report failure. | ||
|
|
||
| # Provide a custom error message |
There was a problem hiding this comment.
To be consistent with the rest of document please change that to: Adding custom failure message
| # Provide a custom error message | ||
| Expectations allow you to provide a custom error message as second argument: | ||
| ````sql | ||
| ut.expect( a_actual {data-type}, 'custom error message if expectation fails' ).to_{matcher}; |
There was a problem hiding this comment.
Can you replace the 'error message' with 'failure message' or just 'custom message'.
There is a difference between error and failure as we define errored test as a test procedure that raised an unhandled exception.
replaced "error" with "failure", moved section as sub-section of Concepts, reworked Concepts slightly
Fixes #485