Grails Integration tests and “methodMissing” in plugins

I’m working on a quick internal plugin that has domain models, and I wrote an integration test that did a findAll().

BOOM! Dreading errors about “methodMissing” not helping find all of the model.

I forgot something key about plugins: they’re created with a very limited set of plugins installed, keeping their dependencies minimal. Makes perfect sense, really.

In my case, I just needed to add “:hibernate:$grailsVersion” to the list of build dependencies in BuildConfig.groovy. Off we go…

Joe Rinehart's been developing software for Web, mobile, and desktop since 1998. While he mainly now works in Java, Grails, and HTML5, he has a long history of community involvement in the Flash, Flex, and ColdFusion space. As a published author and award-winning speaker, he's bringing his skills to CompileDammit to help users new to Grails and Java. When he's not coding, he's either spending time with his family or feeding an appetite for endurance mountain bike racing. (8/9/2012 update: He's now either spending time with his family or getting over a huge knee injury caused by endurance mountain bike racing.)

Posted in Uncategorized
One comment on “Grails Integration tests and “methodMissing” in plugins
  1. Have you checkout the Spock framework?

    It’s pretty awesome …

    http://code.google.com/p/spock/