| 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: | Roshan Dawrani (rosh...@gmail.com) | |
| Date: | Dec 19, 2011 8:32:58 am | |
| List: | org.codehaus.grails.user | |
| Attachments: | ![]() grails2-spock-unittest-issue.zip - 156k | |
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.
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.
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 :-)*
Cheers.
-- Roshan http://roshandawrani.wordpress.com/
--------------------------------------------------------------------- To unsubscribe from this list, please visit:






.zip