Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Added example for custom expectation-fail message in docs #486
Conversation
|
Hi @pesse , I think that the whole section you are proposing to add, could go as sup-section under the Concepts. Thanks for the contribution. It's a nice addition to the documentation. |
| @@ -471,3 +471,55 @@ end; | |||
| ``` | |||
| Since NULL is neither *true* nor *not true*, both expectations will report failure. | |||
|
|
|||
| # Provide a custom error message | |||
jgebal
Sep 29, 2017
Member
To be consistent with the rest of document please change that to: Adding custom failure message
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}; |
jgebal
Sep 29, 2017
Member
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.
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