It seems that this cannot be done because the API does not support it. Check out the API . The following code snippet works with errors:
@Grab('org.spockframework:spock-core:0.7-groovy-2.0')
@Grab('cglib:cglib-nodep:3.1')
import spock.lang.*
class Test extends Specification {
def 'test'() {
given:
def o = new Object()
def s = Spy(o)
}
}
source
share