In one of my integration tests, I need to get a list of all the controllers
In a gsp I can use:
${grailsApplication.controllerClasses.sort { it.fullName }
But I cannot use this method inside an integration test.
I am using Grails 1.3.7
In one of my integration tests, I need to get a list of all the controllers
In a gsp I can use:
${grailsApplication.controllerClasses.sort { it.fullName }
But I cannot use this method inside an integration test.
I am using Grails 1.3.7
You can also use the grailsApplication to get to all Domain classes or Controller classes (as well as probably other artifact types I'm unaware of).
Class IntegrationTests {
def grailsApplication
@Test
void something() {
def controllers = grailsApplication.getArtefacts("Controller")
}
}