Allow custom snippets directory via JUnit 5

See gh-633
This commit is contained in:
Jochen Just
2019-08-09 12:38:12 +02:00
committed by Andy Wilkinson
parent cc22dbfe26
commit 43ec46fcc1
2 changed files with 30 additions and 1 deletions

View File

@@ -397,6 +397,18 @@ based on your project's build tool:
|===
If you are using JUnit 5.1 or later the default can be overridden by providing
an output directory when registering the `RestDocumentationExtension` instance:
[source,java,indent=0]
----
public class JUnit5ExampleTests {
@RegisterExtension
static final RestDocumentationExtension restDocumentation =
new RestDocumentationExtension ("custom");
}
----
Next, you must provide a `@BeforeEach` method to configure MockMvc, WebTestClient, or