Spock Grails extension – execute or ignore specification depending on the environment

Our newest Spock Grails environment extensions plugin adds two annotations to Spock:

  • @ExecuteForEnvironment
  • @IgnoreForEnvironment

You specify environment(s) as the annotation parameter, e.g. @ExecuteForEnvironment(['test_integration', 'test_performance']) or @IgnoreForEnvironment('test'). More examples can be found in the official user guide.

Grails Fixtures Plugin – Object Templates

Grails Fixtures plugin gives you a Grails domain object factory (or object mother if you like fancy names :)) thats lets you define your test fixture using a DSL.

Now, starting from the current snapshot (1.0.8-SNAPSHOT version) you can define domain object templates. A template defines an object with some common properties that will be replicated in all object instances based on that template.

Interested? Then continue reading Marcin’s blog…