keeganwitt / gmock

Automatically exported from code.google.com/p/gmock
6 stars 2 forks source link

@WithGMock conflicting with Grails 2.0 #115

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
See this Grails issue: http://jira.grails.org/browse/GRAILS-8133

Apparently the error goes away if the @WithGMock annotation is removed. Here's 
a synposis of sorts from Graeme:

<quote>
its all very complicated, apparently you aren't allowed to add a primary class 
node to a newly created code added by a transform

otherwise it leads to NPE

also adding a method that contains generics is also problematic

it looks to me they need to do something like

https://github.com/grails/grails-core/blob/master/grails-core/src/main/groovy/or
g/codehaus/groovy/grails/compiler/injection/GrailsASTUtils.java#L439

as it seems they are adding a new method that refers to class node that is a 
primary class node that refers to generics

notice the use of the nonGeneric method there

also if your'e doing with any primary ClassNodes you should call 
classNode.getPlainNodeReference() apparently
</quote>

Original issue reported on code.google.com by p.ledbr...@gmail.com on 11 Oct 2011 at 12:12

GoogleCodeExporter commented 8 years ago

Original comment by JohnnyJianHY on 11 Oct 2011 at 12:30

GoogleCodeExporter commented 8 years ago
Issue 117 has been merged into this issue.

Original comment by JohnnyJianHY on 23 Oct 2011 at 1:20

GoogleCodeExporter commented 8 years ago

Original comment by JohnnyJianHY on 24 Oct 2011 at 11:38

GoogleCodeExporter commented 8 years ago
Issue 118 has been merged into this issue.

Original comment by JohnnyJianHY on 25 Nov 2011 at 1:35

GoogleCodeExporter commented 8 years ago
Issue 119 has been merged into this issue.

Original comment by JohnnyJianHY on 29 Nov 2011 at 12:03

GoogleCodeExporter commented 8 years ago
Grails 2.0 is going out this week. Any chance of a GMock release soon? I don't 
really fancy rewriting all my Grails tests that use GMock. Thanks!

Original comment by p.ledbr...@gmail.com on 13 Dec 2011 at 2:44

GoogleCodeExporter commented 8 years ago
The release is in progress. Julien is working on that.

Original comment by JohnnyJianHY on 13 Dec 2011 at 3:04