Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Added example for custom expectation-fail message in docs#486

Merged
jgebal merged 2 commits intodevelopfrom
docs_exampleForCustomExpectationFailMessage
Sep 29, 2017
Merged

Added example for custom expectation-fail message in docs#486
jgebal merged 2 commits intodevelopfrom
docs_exampleForCustomExpectationFailMessage

Conversation

@pesse
Copy link
Copy Markdown
Member

@pesse pesse commented Sep 28, 2017

Fixes #485

@ghost ghost assigned pesse Sep 28, 2017
@ghost ghost added the in progress label Sep 28, 2017
Copy link
Copy Markdown
Member

@jgebal jgebal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/userguide/expectations.md Outdated
```
Since NULL is neither *true* nor *not true*, both expectations will report failure.

# Provide a custom error message
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be consistent with the rest of document please change that to: Adding custom failure message

Comment thread docs/userguide/expectations.md Outdated
# 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};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

@jgebal jgebal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!
Thanks @pesse

@jgebal jgebal added this to the v3.1.0 milestone Sep 29, 2017
@jgebal jgebal merged commit e448d70 into develop Sep 29, 2017
@ghost ghost removed the in progress label Sep 29, 2017
@jgebal jgebal deleted the docs_exampleForCustomExpectationFailMessage branch October 20, 2017 07:06
@jgebal jgebal modified the milestones: v3.1.0, v3.0.4 Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants