When I execute this method in an integration test, it works great. When I execute it via a unit test or in a GSP via run-app, code.metaClass.classNode is null, presumably because the source is not on the classpath.
All of the closures are defined in the same Config file in grails-app/conf.
1) Does anyone know how I can compile a Grails app and keep sources on the classpath during run-app/deployment?
2) Does anyone have a suggestion for getting the source of something defined in a Config.groovy file?
Any help or suggestions people could provide would be greatly appreciated.