geb / issues

Repository for Geb's issue tracker
12 stars 4 forks source link

Geb Grails plugin doesn't work with default Spock integration provided in Grails 2.3 #264

Closed geb-bot closed 9 years ago

geb-bot commented 11 years ago

Originally created by Jeff Smith.

Grails 2.3 includes Spock as it's default testing framework - there is no need to install the separate Spock plugin any more. If you install the geb grails plugin in a grails 2.3 application, the functional tests do not run - but no errors are shown. Googling around a bit I found this comment on the issue from the Grails team: http://jira.grails.org/browse/GRAILS-10229?focusedCommentId=76129&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-76129

geb-bot commented 11 years ago

Originally posted by Marcin Erdmann.

This should be fixed in the 0.9.2-SNAPSHOT version of the plugin. Please also see http://markmail.org/thread/e22qjb26pr7iu57d.

geb-bot commented 11 years ago

Originally posted by Jeff Smith.

OK. Thanks Marcin. I will try out the 0.9.2 snapshot version for now.

geb-bot commented 11 years ago

Originally posted by Brian Jacobsen.

I tried to update the https://github.com/geb/geb-example-grails to use Grails 2.3.0.

Here is what I did:

  1. Used Grails upgrade to 2.3.0
  2. Updated BuildConfig.groovy to use "geb:0.9.2-SNAPSHOT" as suggested here.
  3. Changed BuildConfig.groovy to not fork tests. http://jira.grails.org/browse/GRAILS-10229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
  4. Changed _Events.groovy in geb 0.9.2 plugin to 'def builtinSpecTestTypeClassName = "org.codehaus.groovy.grails.test.spock.GrailsSpecTestType"' http://jira.grails.org/browse/GRAILS-10229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
  5. Updated other dependencies and plugins in BuildConfig.groovy to latest versions and commented out spock dependency.

Still fails when I try to run: Grails test-app functional:

| Server running. Browse to http://localhost:8080/geb-example-grails | Server stopped | Error Fatal error running tests: org/junit/internal/AssumptionViolatedException (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.) java.lang.NoClassDefFoundError: org/junit/internal/AssumptionViolatedException at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy:95) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at TestApp$_run_closure1.doCall(TestApp.groovy:32) at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) at gant.Gant.withBuildListeners(Gant.groovy:427) at gant.Gant.this$2$withBuildListeners(Gant.groovy) at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:415) at gant.Gant.this$2$dispatch(Gant.groovy) at gant.Gant.invokeMethod(Gant.groovy) at gant.Gant.executeTargets(Gant.groovy:591) at gant.Gant.executeTargets(Gant.groovy:590) Caused by: java.lang.ClassNotFoundException: org.junit.internal.AssumptionViolatedException ... 28 more

I also tried to manually add various other "hacks" such as adding test 'org.spockframework:spock-grails-support:0.7-groovy-2.0' to dependencies and manually adding funky spock plugin as suggested elsewhere but without luck.

I attached my version of the updated geb-example-grails application.

geb-bot commented 11 years ago

Resolved