Package spock.mock

Annotation Type AutoAttach

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.