Registry / testing / spock-spring

spock-spring

JSON →
library2.4-groovy-3.0javamavenunverified

Spock's Spring Module integrates Spring's TestContext framework with Spock for testing Spring applications.

<dependency> <groupId>org.spockframework</groupId> <artifactId>spock-spring</artifactId> <version>2.4-groovy-3.0</version> </dependency>
INSTALL
IMPORT
SIG · SPOCK-SPRING
S
spock-spring
testingjavav2.4-groovy-3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SpringBean
✓ org.spockframework.spring.SpringBean

Use SpringBean to inject a Spring bean into a Spock specification.

import org.spockframework.spring.SpringBean import spock.lang.Specification class MyServiceSpec extends Specification { @SpringBean MyService myService = new MyService() def "test service"() { expect: myService.doSomething() == "result" } }
Debug
Known issues
breakingSpock 2.x requires Groovy 3.x; older Groovy versions are incompatible.
fix
Use Spock 1.x for Groovy 2.x or upgrade to Groovy 3.x.
affects: >=2.0
Upgrade
Version history
2.4-groovy-3.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
14
Resources
spock-spring — mvn dependency:get spock-spring · libregistry