mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Add dependency management for spock-spring and document its use
Closes #1234
This commit is contained in:
parent
124418f83f
commit
672d713f99
@ -949,6 +949,11 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.spockframework</groupId>
|
||||
<artifactId>spock-spring</artifactId>
|
||||
<version>${spock.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-framework-bom</artifactId>
|
||||
|
@ -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
|
||||
<<boot-features-testing-spring-boot-applications,described above>> 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
|
||||
|
Loading…
Reference in New Issue
Block a user