Skip to content

Commit

Permalink
Add any matcher example in README.md
Browse files Browse the repository at this point in the history
The other matchers shown here are functions but `any` is not. This may cause users to assume all matchers are functions and try calling `any()`.
  • Loading branch information
edwinnyawoli authored and srawlins committed Jun 2, 2020
1 parent bc613fe commit 1dcd822
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ when(cat.walk(["roof","tree"])).thenReturn(2);
// ... or matchers
when(cat.eatFood(argThat(startsWith("dry")))).thenReturn(false);
when(cat.eatFood(any)).thenReturn(false);
// ... or mix aguments with matchers
when(cat.eatFood(argThat(startsWith("dry")), hungry: true)).thenReturn(true);
Expand Down

0 comments on commit 1dcd822

Please sign in to comment.