Need help installing spock in Eclipse.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Need help installing spock in Eclipse.

Mahendran Reddy
Hi,

I tried to follow the instruction for installing Spock in Eclipse.
I installed the Groovy Eclipse plugin from
http://dist.springsource.org/milestone/GRECLIPSE/e3.5/.
I added on Groovy TestNG testcase and it worked fine.
Now I added spock-core-0.3.jar to my project classpath.
Now I tried to run the same testcase it doesnot do. When examining the
exception I find the below in Eclipse error log.

java.lang.NoSuchMethodError:
org.codehaus.groovy.ast.ModuleNode.getImport(Ljava/lang/String;)Lorg/
codehaus/groovy/ast/ClassNode;
at org.spockframework.compiler.EarlyTransform.nameResolvesToType
(EarlyTransform.java:81)

Am I missing something here. ?

--

You received this message because you are subscribed to the Google Groups "Spock Framework" group.
To post to this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need help installing spock in Eclipse.

Peter Niederwieser
Administrator
The problem is that you are using spock-core for Groovy 1.6 with the Groovy Eclipse plugin for Groovy 1.7. Either get spock-core-0.3-groovy-1.7 from http://m2repo.spockframework.org/snapshots/, or switch the Groovy Eclipse plugin to 1.6 mode (Preferences->Groovy->Compiler). However, the latter is still experimental and doesn't currently work for me. So I recommend you go for the former. Also, since it's still early days for the Groovy Eclipse plugin, you have to be careful here and there:
 - Before running a single spec, make sure it is open in the editor
 - When running a single spec with Run As..., be sure to click the class rather than the file in the Project Explorer

Hope this helps. Let us know how it goes.

Cheers,
Peter

On 19.11.2009, at 15:32, Mahendran Reddy wrote:

> Hi,
>
> I tried to follow the instruction for installing Spock in Eclipse.
> I installed the Groovy Eclipse plugin from
> http://dist.springsource.org/milestone/GRECLIPSE/e3.5/.
> I added on Groovy TestNG testcase and it worked fine.
> Now I added spock-core-0.3.jar to my project classpath.
> Now I tried to run the same testcase it doesnot do. When examining the
> exception I find the below in Eclipse error log.
>
> java.lang.NoSuchMethodError:
> org.codehaus.groovy.ast.ModuleNode.getImport(Ljava/lang/String;)Lorg/
> codehaus/groovy/ast/ClassNode;
> at org.spockframework.compiler.EarlyTransform.nameResolvesToType
> (EarlyTransform.java:81)
>
> Am I missing something here. ?
>
> --
>
> You received this message because you are subscribed to the Google Groups "Spock Framework" group.
> To post to this group, send email to [hidden email].
> For more options, visit this group at http://groups.google.com/group/spockframework?hl=.
>
>

--

You received this message because you are subscribed to the Google Groups "Spock Framework" group.
To post to this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Need help installing spock in Eclipse.

Mahendran Reddy
Hi Peter,
Thanks for your reply.
I did the go through using spock-core-0.3-groovy1.7 and it worked
fine ! !
The Groovy Eclipse plugin tips helped me to get around other problem I
faced.
I am on writing specs for integration and mock tests with spock. Will
let know hw it goes.

Thanks



On Nov 20, 2:24 am, Peter Niederwieser <[hidden email]> wrote:

> The problem is that you are using spock-core for Groovy 1.6 with the Groovy Eclipse plugin for Groovy 1.7. Either get spock-core-0.3-groovy-1.7 fromhttp://m2repo.spockframework.org/snapshots/, or switch the Groovy Eclipse plugin to 1.6 mode (Preferences->Groovy->Compiler). However, the latter is still experimental and doesn't currently work for me. So I recommend you go for the former. Also, since it's still early days for the Groovy Eclipse plugin, you have to be careful here and there:
>  - Before running a single spec, make sure it is open in the editor
>  - When running a single spec with Run As..., be sure to click the class rather than the file in the Project Explorer
>
> Hope this helps. Let us know how it goes.
>
> Cheers,
> Peter
>
> On 19.11.2009, at 15:32, Mahendran Reddy wrote:
>
> > Hi,
>
> > I tried to follow the instruction for installing Spock in Eclipse.
> > I installed the Groovy Eclipse plugin from
> >http://dist.springsource.org/milestone/GRECLIPSE/e3.5/.
> > I added on Groovy TestNG testcase and it worked fine.
> > Now I added spock-core-0.3.jar to my project classpath.
> > Now I tried to run the same testcase it doesnot do. When examining the
> > exception I find the below in Eclipse error log.
>
> > java.lang.NoSuchMethodError:
> > org.codehaus.groovy.ast.ModuleNode.getImport(Ljava/lang/String;)Lorg/
> > codehaus/groovy/ast/ClassNode;
> > at org.spockframework.compiler.EarlyTransform.nameResolvesToType
> > (EarlyTransform.java:81)
>
> > Am I missing something here. ?
>
> > --
>
> > You received this message because you are subscribed to the Google Groups "Spock Framework" group.
> > To post to this group, send email to [hidden email].
> > For more options, visit this group athttp://groups.google.com/group/spockframework?hl=.

--

You received this message because you are subscribed to the Google Groups "Spock Framework" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/spockframework?hl=.


Loading...