I like your framework a lot!
Yet one thing I can't figure out is how to create "groups" (e.g.
annotating a few methods across packages that take a very long time to
run with @Big and run them separately) - is that possible?
Cheers,
stephanos
On 16.02.2010, at 11:33, stephanos wrote:
> Hi,
>
> I like your framework a lot!
Thanks!
> Yet one thing I can't figure out is how to create "groups" (e.g.
> annotating a few methods across packages that take a very long time to
> run with @Big and run them separately) - is that possible?
This will be possible in 0.4, and is already available in the latest 0.4 snapshots. You need to create a SpockConfig.groovy file with this content:
import my.pkg.Slow
runner {
include Slow
}
'Slow' can be a base class or (in this case more likely) an annotation type. Apart from 'include', you can also specify 'exclude'.
In order for Spock to find your configuration file, you can either save it in the default location ~/.spock/SpockConfig.groovy, or point to it with a Java system property: '-Dspock.configuration=/path/to/SpockConfig.groovy'
Cheers,
Peter