Am trying to scaffold functional tests for my plugin and nearly finished but have one FINAL bug.
I have to use '_GrailsRun' as a target to get 'config' properties, appCtx and grailsApp so I can read domain and services.
Upon running the script now for final write, it gives me an error like this:
Caused by: org.codehaus.groovy.grails.exceptions.GrailsConfigurationException: Class not found loading Grails application: functional.SectionFunctionalSpec
at org.codehaus.groovy.grails.commons.DefaultGrailsApplication.<init>(DefaultGrailsApplication.java:146)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
... 249 more
Caused by: java.lang.ClassNotFoundException: functional.SectionFunctionalSpec
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:655)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:765)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:753)
at org.codehaus.groovy.grails.commons.DefaultGrailsApplication.<init>(DefaultGrailsApplication.java:144)
Nw to put this into context, the template for the test is 'FunctionalSpec.groovy.template' with the name of each resource appended to the front.
In this case, you can see the error is for 'functional.SectionFunctionalSpec'... but this error is being thrown before anything is RUN!!! Nothing is being written yet.
How do I fix this and why is this occurring??