From 672d713f99bf6b6d5f56d3ee0908cf5ca7d12589 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 15 Jul 2014 14:36:56 +0100 Subject: [PATCH] Add dependency management for spock-spring and document its use Closes #1234 --- spring-boot-dependencies/pom.xml | 5 +++++ .../src/main/asciidoc/spring-boot-features.adoc | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/spring-boot-dependencies/pom.xml b/spring-boot-dependencies/pom.xml index 0d1abd3ffe..9c9e9d52ba 100644 --- a/spring-boot-dependencies/pom.xml +++ b/spring-boot-dependencies/pom.xml @@ -949,6 +949,11 @@ + + org.spockframework + spock-spring + ${spock.version} + org.springframework spring-framework-bom diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index c3b6e7aa45..c6c69bddb7 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -2005,8 +2005,11 @@ the actual port that was allocated for the duration of the tests. [[boot-features-testing-spring-boot-applications-with-spock]] ==== Using Spock to test Spring Boot applications -If you wish to use Spock to test a Spring Boot application then you cannot use the -`@SpringApplicationConfiguration` annotation that was +If you wish to use Spock to test a Spring Boot application you should add a dependency +on Spock's `spock-spring` module to your application's build. `spock-spring` integrates +Spring's test framework into Spock. + +Please note that you cannot use the `@SpringApplicationConfiguration` annotation that was <> as Spock https://code.google.com/p/spock/issues/detail?id=349[does not find the `@ContextConfiguration` meta-annotation]. To work around this limitation, you should use