Comparing Maps for equality in a Spock test
As of version 0.4, the Spock testing framework doesn't handle Map comparisons well if either comparand contains non-String values. To test for equality of two Maps, use the following helper function:

As of version 0.4, the Spock testing framework doesn't handle Map comparisons well if either comparand contains non-String values. To test for equality of two Maps, use the following helper function:
I've recently switched my Grails development environment from NetBeans to Eclipse (specifically, SpringSource Tool Suite), and I have to say, I'm really impressed. With the work the guys at SpringSource have been putting into the Grails plugin recently, I can now say without a doubt that STS is now my favourite environment for Groovy/Grails development.
For example, if you're using the new dependency DSL (in BuildConfig.groovy) in Grails 1.2.x, you'll know that NetBeans doesn't add these dependencies to the project classpath, meaning red error squiggles everywhere. On the other hand, in STS you simply have to tell your project to refresh its dependencies, and everything from BuildConfig.groovy is added to the project classpath.
As great as the Grails support in STS is, I find it to be a little over-zealous in identifying "errors" in your project. For example, if you use the excellent Spock testing plugin, STS throws up a few obscure errors. Here they are:
You can add the two dependencies to your BuildConfig.groovy with the following statement inside the dependencies closure: compile 'org.apache.ant:ant-junit:1.7.', 'org.spockframework:spock-core:0.4-SNAPSHOT' Now, after you refresh your project dependencies (Grails Tools -> Refresh Dependencies), these errors will disappear.