| From | Sent On | Attachments |
|---|---|---|
| Roshan Dawrani | Dec 19, 2011 2:05 am | |
| Roshan Dawrani | Dec 19, 2011 2:24 am | |
| ld...@ldaley.com | Dec 19, 2011 2:46 am | |
| Roshan Dawrani | Dec 19, 2011 2:52 am | |
| ld...@ldaley.com | Dec 19, 2011 2:55 am | |
| Sam Carr | Dec 19, 2011 3:00 am | |
| Roshan Dawrani | Dec 19, 2011 3:10 am | |
| Roshan Dawrani | Dec 19, 2011 3:13 am | |
| Roshan Dawrani | Dec 19, 2011 3:35 am | |
| Roshan Dawrani | Dec 19, 2011 4:32 am | |
| Roshan Dawrani | Dec 19, 2011 4:47 am | |
| Roshan Dawrani | Dec 19, 2011 5:03 am | |
| Roshan Dawrani | Dec 19, 2011 5:12 am | |
| Roshan Dawrani | Dec 19, 2011 5:50 am | |
| Roshan Dawrani | Dec 19, 2011 7:24 am | |
| Roshan Dawrani | Dec 19, 2011 7:38 am | |
| Roshan Dawrani | Dec 19, 2011 8:32 am | .zip |
| ld...@ldaley.com | Dec 20, 2011 9:06 am | |
| Roshan Dawrani | Dec 21, 2011 11:33 am | |
| Luke Daley | Dec 21, 2011 11:46 am |
| Subject: | Re: [grails-user] which spock plugin to use with Grails 2.0? | |
|---|---|---|
| From: | ld...@ldaley.com (ld...@ldaley.com) | |
| Date: | Dec 20, 2011 9:06:08 am | |
| List: | org.codehaus.grails.user | |
Fixed.
You'll need to get the latest snapshot of spock-grails-support (i.e. grails
test-app --refresh-dependencies)
On 19/12/2011, at 4:33 PM, Roshan Dawrani wrote:
On Mon, Dec 19, 2011 at 9:03 PM, Luke Daley <lda...@gmail.com> wrote:
It's here: https://github.com/spockframework/spock-grails
Anyway, the link I see in Grails 2.0 is:
1) _GrailsTest.groovy.compileTests() chooses to use extended compiler 'testc'
(GrailsTestCompiler) for unit tests classes.
2) GrailsTestCompiler injects a ASTTransformationCustomizer for TestFor
3) Because of the ASTTransformationCustomizer added in 2), Groovy now
introduces TestForTransformation for all unit test classes, which in turn weaves
in methods from DomainClassUnitTestMixin into the unit test classes.
In this chain, what do you see that can be local to a particular environment? I
can look more, if you can provide a hint.
I can't see anything, I'm stumped.
Looked at your tests for spock-grails plugin.
The difference is that you use gradle based build for it. So (refer 1-3 above),
_GrailsTest.groovy does not come into the picture as it does when "grails
test-app unit:" is done. That's why GrailsTestCompiler and then weaving of
DomainClassUnitTestMixin also does not come into the picture for your tests. So,
it's all clean.
That's not the case, the Gradle build is delegating to the Grails build system
so they are compiled the same way. I'm at a a loss to explain why these tests
pass.
I am attaching an almost blank grails application created with Grails 2.0.0.
All I did was:
a) create an app
b) add a dependency to plugin ':spock:0.6-SNAPSHOT'
c) grails create-domain-class book
d) grails test-app unit: -> this now fails to compile BookSpec added in 3) due
to the very same error that I have been reporting and explaining :-)
This example is now working for me with the new snapshot, cheers.
LD.
--------------------------------------------------------------------- To unsubscribe from this list, please visit:






.zip