| 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: | Sam Carr (samc...@mac.com) | |
| Date: | Dec 19, 2011 3:00:51 am | |
| List: | org.codehaus.grails.user | |
Note that your Spock tests should subclass Specification, not UnitSpec with
Grails 2. Then you should use the @TestFor and @Mock annotations to hook into
Grails' new test support. So a controller unit test might start as below. See
the Grails 2.0 testing docs for more information.
@TestFor(CashController) @Mock([Dish, CashTransaction]) class CashControllerSpec extends Specification { ...
On 19 Dec 2011, at 10:25, Roshan Dawrani wrote:
Even with 0.6-SNAPSHOT, I am getting the following error. I don't know if it is
related, but spock-0.6-SNAPSHOT plugin still seems to be pulling in the snapshot
jar - spock-grails-support-0.6-groovy-1.8-SNAPSHOT.jar
Which framework adds mockDomain(Class) to the class under test - Grails or
Spock? Wondering where does the inconsistency lie.
---------------------------------------------------------------------------------
The return type of java.lang.Object mockDomain(java.lang.Class) in ClientSpec is
incompatible with void mockDomain(java.lang.Class) in
grails.plugin.spock.UnitSpec
. At [-1:-1]
@ line 8, column 1.
class ClientSpec extends UnitSpec
---------------------------------------------------------------------------------
On Mon, Dec 19, 2011 at 3:41 PM, Luke Daley <lda...@gmail.com> wrote:
On 19/12/2011, at 10:06 AM, Roshan Dawrani wrote:
Hi,
I am looking into Grails 1.3.7 to 2.0 upgrade and some Spock tests are failing
to compile with errors like below:
---------------------------------------------------------------------------------------------------------------------------------------------------
ClientSpec.groovy: 8: The return type of java.lang.Object
mockDomain(java.lang.Class) in foo.Spec is incompatible with void
mockDomain(java.lang.Class) in grails.plugin.spock.UnitSpec
. At [-1:-1]
@ line 8, column 1.
class ClientSpec extends UnitSpec
---------------------------------------------------------------------------------------------------------------------------------------------------
I am currently using org.spockframework:spock:0.6-groovy-1.8-SNAPSHOT plugin,
which pulls in spock-grails-support-0.6-groovy-1.8-SNAPSHOT.jar
Is this the correct version of plugin to use with Grails 2.0? Any hints on why I
am getting the above mentioned error?
You should be using “0.6-SNAPSHOT” as the version of the plugin.
--
You received this message because you are subscribed to the Google Groups "Spock
Framework - User" group.
To post to this group, send email to spoc...@googlegroups.com.
To unsubscribe from this group, send email to
spockframework+unsu...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/spockframework?hl=en.
-- Roshan http://roshandawrani.wordpress.com/






.zip