Bootstrapping Grails integration tests

It is quite easy to prepare test environment the same as the development one. Just use Bootstrap.

class BootstrappedTests extends GroovyTestCase {
  void testBootstrap() {
    new BootStrap().init(null) 
    assert MyDomain.count() == 5   // Perform your tests here
    }
}

One Response to “Bootstrapping Grails integration tests”

  1. Websites tagged "bootstrapping" on Postsaver Says:

    […] – comment on marketing in troubled times: selling freedom by … saved by archerroot2009-04-24 – Bootstrapping Grails integration tests saved by 1luke22009-04-19 – bootstrapping church saved by poky2009-04-17 – wavethenavel.com Blog […]