-
Notifications
You must be signed in to change notification settings - Fork 477
Open
Labels
Description
Originally reported on Google Code with ID 247
What steps will reproduce the problem? If possible, provide source code and
stack trace.
1. Install the plugin
2. create an integration test via the grails command / script
3. You have to have several other unit and integration tests, preferably that interact
with GORM or other dynamic methods.
4. Now, see the inclusion of @TestMixin(GrailsUnitTestMixin)? Yeah, that causes random
test failures in both the unit and integration test phases depending on what other
tests you have. You cannot have ANY unit test artifacts in integration tests or it
corrupts the test environments of both.
Note on #4, this ONLY affects grails 2.0.x installs and is related to the changes in
using mixins as far as I can tell. It's not specific to the spock plugin either.
Add that mixin to a normal/preexisting integration test and it should produce similar
errors. I had to swap the styles of all unit and integration tests on upgrading to
2.0.x. Having said that, the fix is to change whatever mods to the create script were
made, to not include that annotation for integration tests.
What version of Spock and Groovy are you using?
spock 0.6 groovy 1.8.6 and grails 2.0.3
Please provide any additional information below. You can also assign
labels.
Very cool plugin, but why hijack the create-XX-test scripts? I'd honestly much prefer
to have the option of creating spock specs or standard tests... meaning, you should
probably create your own 'create' script.
Reported by robb.dan on 2012-04-14 22:00:14