Skip to content

Commit 672d713

Browse files
committed
Add dependency management for spock-spring and document its use
Closes #1234
1 parent 124418f commit 672d713

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

spring-boot-dependencies/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,11 @@
949949
</exclusion>
950950
</exclusions>
951951
</dependency>
952+
<dependency>
953+
<groupId>org.spockframework</groupId>
954+
<artifactId>spock-spring</artifactId>
955+
<version>${spock.version}</version>
956+
</dependency>
952957
<dependency>
953958
<groupId>org.springframework</groupId>
954959
<artifactId>spring-framework-bom</artifactId>

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,8 +2005,11 @@ the actual port that was allocated for the duration of the tests.
20052005
[[boot-features-testing-spring-boot-applications-with-spock]]
20062006
==== Using Spock to test Spring Boot applications
20072007

2008-
If you wish to use Spock to test a Spring Boot application then you cannot use the
2009-
`@SpringApplicationConfiguration` annotation that was
2008+
If you wish to use Spock to test a Spring Boot application you should add a dependency
2009+
on Spock's `spock-spring` module to your application's build. `spock-spring` integrates
2010+
Spring's test framework into Spock.
2011+
2012+
Please note that you cannot use the `@SpringApplicationConfiguration` annotation that was
20102013
<<boot-features-testing-spring-boot-applications,described above>> as Spock
20112014
https://code.google.com/p/spock/issues/detail?id=349[does not find the
20122015
`@ContextConfiguration` meta-annotation]. To work around this limitation, you should use

0 commit comments

Comments
 (0)