Skip to content

Commit

Permalink
Update the guide to mention the showDiff argument of assert
Browse files Browse the repository at this point in the history
  • Loading branch information
astorije committed Feb 28, 2015
1 parent 512643d commit 9c05640
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data/guide/plugins/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ the assertion failed and the first error message will be thrown as part of a `ch
Conversely, if the language chain was negated, it will consider `false` a pass and `true` a failure.
The second error message will be included in the thrown error instead.

In all, the `assert` method accepts five arguments:
In all, the `assert` method accepts six arguments:

1. a boolean (result of a truth test)
2. a string error message to be used if the first argument is `false`
3. a string error message to be used if the assertion is negated and the first argument is `true`
4. (optional) the expected value
5. (optional) the actual value, which will default to `_obj`
6. (optional) a boolean which indicates whether to display a diff in addition to the message if the first argument is `false`


### Composing Error Messages

Expand Down

0 comments on commit 9c05640

Please sign in to comment.