Skip to content

Commit

Permalink
Clarifies Readme about exception handling
Browse files Browse the repository at this point in the history
  • Loading branch information
joevandyk authored May 19, 2019
1 parent 3a8656b commit 25d14e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ context.success? # => false

Normally, however, these exceptions are not seen. In the recommended usage, the controller invokes the interactor using the class method `call`, then checks the `success?` method of the context.

This works because the `call` class method swallows exceptions. When unit testing an interactor, if calling custom business logic methods directly and bypassing `call`, be aware that `fail!` will generate such exceptions.
This works because the `call` class method swallows these exceptions. When unit testing an interactor, if calling custom business logic methods directly and bypassing `call`, be aware that `fail!` will generate such exceptions.

See *Interactors in the Controller*, below, for the recommended usage of `call` and `success?`.

Expand Down

0 comments on commit 25d14e7

Please sign in to comment.