Ive picked up a Grails project which I believe has been upgraded from a Grails 1.x.x release.
Using the Grails CLI, I can successfully get the code compiled and a WAR built, but when I run a "grails test-app -unit" command, over 1/2 of the tests fail.
When I run the JUnit tests within GGTS the Tests PASS?!?!?. Running the above Grails command within GGTS produces the same failures as highlighed above.
The main failure reason seems to be with GMock, the following output is seen at the top of each stacktrace:
groovy.lang.MissingMethodException: No signature of method: org.gmock.internal.metaclass.MockProxyMetaClass$2.doCall() is applicable for argument types: () values: [ ]
Example code lines where this failure would happen is:
Sample A
aService.dbWrapper = mock()
aService.dbWrapper.getDB().returns(mockDB) // failure on this line
Sample B
aService.anotherService = mock()
aService.anotherService.getSource(ID).returns(SOURCE) // failure on this line
Im using the following configuration:
Can anyone shed any light onto why the tests fail in this way using the Grails CLI but work fine in GGTS when ran as JUnit tests ?
Looks like I have possibly found the answer