Skip to content

Commit

Permalink
Merge pull request #22 from jordi-farre/master
Browse files Browse the repository at this point in the history
[master]: update README explaining how it works with JUnit5
  • Loading branch information
jsalinaspolo authored Oct 29, 2020
2 parents 42bb537 + 3a5a726 commit f09a442
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ public void verify_logs_using_rule() {
}
```

Using JUnit 5 Extension:

```java
@RegisterExtension
public LogCaptureExtension logCaptureExtension = new LogCaptureExtension();

@Test
public void verify_logs_using_extension() {
log.info("a message");

logCaptureExtension.logged(aLog().info().withMessage("a message"));
}
```

Using Spock:

```groovy
Expand Down

0 comments on commit f09a442

Please sign in to comment.