Package spock.mock
Annotation Type AutoAttach
@Beta @Target(FIELD) @Retention(RUNTIME) public @interface AutoAttach
Automatically attaches detached mocks
DetachedMockFactory
to a Specification.
This can be used if there is no explicit framework support for attaching detached mocks.
It does not work for static
or @Shared
fields.
If you are using the Spring Framework, then use spock-spring extension instead.- Since:
- 1.2