Skip to content

Instantly share code, notes, and snippets.

@tomgullo
Created September 11, 2009 12:02
Show Gist options
  • Save tomgullo/185252 to your computer and use it in GitHub Desktop.
Save tomgullo/185252 to your computer and use it in GitHub Desktop.
grails test with datasource
GrailsTest extends GroovyTestCase implements ApplicationContextAware {
ApplicationContext app
def controller
void setUp() {
super.setUp()
controller = MyController()
controller.dataSource = app.getBean("dataSource")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment