Skip to content

Commit 3dc9364

Browse files
committed
Clarify documentation on using Spock 1.0
Closes gh-14612
1 parent da1a17e commit 3dc9364

File tree

2 files changed

+4
-70
lines changed

2 files changed

+4
-70
lines changed

spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6128,19 +6128,10 @@ NOTE: Spring Boot provides dependency management for Spock 1.0. If you wish to u
61286128
`spock.version` property>> in your `build.gradle` or `pom.xml` file.
61296129

61306130
When using Spock 1.1, the annotations <<boot-features-testing-spring-boot-applications,
6131-
described above>> can only be used and you can annotate your `Specification` with
6132-
`@SpringBootTest` to suit the needs of your tests.
6133-
6134-
When using Spock 1.0, `@SpringBootTest` will not work for a web project. You need to use
6135-
`@SpringApplicationConfiguration` and `@WebIntegrationTest(randomPort = true)`. Being
6136-
unable to use `@SpringBootTest` means that you also lose the auto-configured
6137-
`TestRestTemplate` bean. You can create an equivalent bean yourself using the following
6138-
configuration:
6139-
6140-
[source,java,indent=0]
6141-
----
6142-
include::{code-examples}/test/spock/SpockTestRestTemplateExample.java[tag=test-rest-template-configuration]
6143-
----
6131+
described above>> can be used and you can annotate your `Specification` with
6132+
`@SpringBootTest` to suit the needs of your tests. When using Spock 1.0, `@SpringBootTest`
6133+
will not work for a web project. If you wish to use Spock to test a web project, you
6134+
should use Spock 1.1 by overriding the `spock.version` property as described above.
61446135

61456136

61466137

spring-boot-docs/src/main/java/org/springframework/boot/test/spock/SpockTestRestTemplateExample.java

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)