Search This Blog

Monday, December 20, 2010

Grails testing support enhanced:full emulation of GORM

Grails testing support enhanced to provide a full emulation of GORM.
Peter LedBrook(author of Grails in Action) has written a post how to get this in your project.
Pretty easy config and powerful features added.
Grails Rocks!

Config changes needed in short are


1.Add to repositories:
mavenRepo "http://maven.springframework.org/milestone" 
mavenRepo "http://snapshots.repository.codehaus.org" 


2. 
test( "org.grails:grails-datastore-gorm-test:1.0.0.M1") {
     excludes "persistence-api", "sl4j-simple", "commons-logging"

}

3. Add to test
 @Mixin(DatastoreUnitTestMixin) and 
add a call to disconnect() in your tearDown()


No comments:

Post a Comment