Grails unit testing and bootstrap
- by tbruyelle
I wrote an unit test for a controller.
I have a Bootstrap file which alter the metaclass of domain classes by adding a method asPublicMap(). I use this method in the controller to return domain classes as json but only some selected public fields.
My unit test failed because of MissingMethodException for asPublicMap(). As I understood, bootstrap…