where: block is commonly used with a data table but can also be driven by any
Iterable data. It’s worth bearing in mind that the data driving the
where: block doesn’t have to be hardcoded, it can be dynamic. For example, today we implemented a spec to ensure that every table in our database schema has a primary key (because it’s required by HA-JDBC and not automatically added by GORM on join tables).
When creating artifacts such as domain classes, controllers and tag libs Grails generates a JUnit test case. If, like me, you’re digging writing specifications with Spock you’d probably rather have Grails generate one of those. The last thing I want is to manually transform every generated test case into a specification for every artifact I create.