Open GoogleCodeExporter opened 9 years ago
Issue 300 has been merged into this issue.
Original comment by pnied...@gmail.com
on 10 Apr 2013 at 6:16
I have the same issue but it is not linked to interactive mode.
It's happening when I have one unit spock test that mock a specific service and
another unit spock integration test that mock the same service.
If I run them together for being tested, it's not working. If I test them
separatly, it's working.
Original comment by meyskens...@gmail.com
on 15 Apr 2013 at 9:35
I am not in the Grails environment, but I am having the same issue. Tests with
mocked resources pass in isolation but, when run as a testing suite, fail with
the exception:
org.spockframework.mock.CannotCreateMockException: Cannot create mock for class
[myClass]null
Is there a specific Mock teardown that needs to be performed to free up those
resources and allow future mock instances to be created?
I am seeing this with Spock 0.7, Groovy 1.8
Original comment by mrmattri...@gmail.com
on 2 May 2013 at 7:19
Please provide a reproducible example.
Original comment by pnied...@gmail.com
on 3 May 2013 at 12:50
I did in the original report, which was marked as duplicate:
https://code.google.com/p/spock/issues/detail?id=300
Original comment by diaz.sal...@gmail.com
on 3 May 2013 at 5:36
According to mrmattrichards, he is experiencing this problem outside Grails (or
does he just mean outside Grails interactive mode?). It would be very helpful
if I could reproduce this. If the problem only occurs in Grails (and this is my
current understanding), we will have to find a person knowledgable in Grails
internals to look into this.
Original comment by pnied...@gmail.com
on 3 May 2013 at 6:09
I'm also experiencing this problem in a grails 2.3.0 app where we use mocks in
unit tests and also in integration tests.
Original comment by dominicc...@gmail.com
on 24 Oct 2013 at 12:52
When ran with jUnit, tests pass. This problem only occurs when running tests
with grails.
Original comment by alvar.lu...@gmail.com
on 7 Nov 2013 at 12:54
The bug doesn't occur when useObjenesis: false
Original comment by alvar.lu...@gmail.com
on 7 Nov 2013 at 1:40
Having the same issue here when running both unit and integration grails tests
and using mocks in both type of tests with objenesis on the classpath. I can
confirm that using Mock(useObjenesis: false) when the mocking fails in
integration tests is a valid workaround.
Original comment by erd...@gmail.com
on 28 Jan 2014 at 9:51
Issue 335 has been merged into this issue.
Original comment by pnied...@gmail.com
on 28 Jan 2014 at 9:55
Original comment by pnied...@gmail.com
on 28 Jan 2014 at 9:56
See Issue 335. Recent Grails versions implement a workaround. Plan to fix for
1.0.
Original comment by pnied...@gmail.com
on 28 Jan 2014 at 9:58
Original comment by pnied...@gmail.com
on 1 Mar 2015 at 11:46
Original issue reported on code.google.com by
gre...@gmail.com
on 29 Mar 2013 at 11:45