Skip to content

Commit

Permalink
[master]: update README explaining how it works with JUnit5
Browse files Browse the repository at this point in the history
  • Loading branch information
jordi-farre committed Oct 29, 2020
1 parent 42bb537 commit 3a5a726
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 3a5a726

Please sign in to comment.