Spock support got better in IDEA 11, as it now provides the option of running integration and functional specs in Grails as well as straight JUnit. But, I seem to be having problems now with something that was great in IDEA 10. When I debugged a Geb spec, I could evaluate dynamic stuff like $('form'), exploring the remote browser DOM via Geb's Groovy default properties and methods. It was on par with debugging in Selenium IDE.
Now, when I debug with IDEA 11, the expression evaluation only works in Java mode. When I set it to Groovy mode, I just get "No such instance method: 'java.lang.Class.getMetaClass'". I don't know how to get to the Groovy Geb stuff anymore. I guess that Spock is recompiling the specs into Java, and that's somehow breaking the debugger's Groovy support? Or maybe I'm just not doing it like I was before? It's been a while. I tried debugging in both JUnit and Grails. Has anyone else run into this? Debugging other Groovy stuff in Grails works fine.