Compile and run the attached files.
I sent a question on the mailing list regarding this and got the following
answer from Peter:
The first syntax is correct. The only case where it doesn't work is when
ToBeMocked is a class rather than an interface and the caller uses property
rather than setter syntax. In that case, there apparently is some strange
interaction between Groovy and the mock subclass created by Spock. I've seen
something similar before, but haven't been able to figure out what the problem
is. I'll give it another try for 0.7.
I'm using
org.spockframework:spock-core:0.6-groovy-1.8
org.codehaus.groovy:groovy-all:1.8.6
-Steinar
Original issue reported on code.google.com by steinar....@gmail.com on 21 Jun 2012 at 10:50
Original issue reported on code.google.com by
steinar....@gmail.com
on 21 Jun 2012 at 10:50Attachments: