Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 2.0 final
-
Fix Version/s: 2.0.1
-
Component/s: None
-
Labels:None
Description
I use the technique described here (http://ldaley.com/post/615966534/custom-grails-test) to define a custom functional test phase.
Here is how I do it:
import grails.plugin.spock.test.GrailsSpecTestType eventAllTestsStart = { def testTypeName = "custom" def testDirectory = "custom" customTests = [new GrailsSpecTestType(testTypeName, testDirectory)] phasesToRun << "custom" }
With 1.3.7, it works fine, but with 2.0.0, the compilation fails saying that it cannot resolve the class 'grails.plugin.spock.test.GrailsSpecTestType'
It was discussed on the Grails/Geb mailing list here (http://markmail.org/message/z453wagmpvjxluih), where Luke Daley confirmed that there was some regression in this area.
Note to self: This may not be a regression. This may just be an ordering issue.
Roshan may have added this code to _Events.groovy after installing the spock plugin with 1.3.x, which means that spock was on the classpath when this was compiled for the first time. When moving to 2.0.0, the first build would compile this before installing any plugins, meaning that spock will not be on the classpath for that compile.