For many years I was a happy CVS user. I might even qualify as a CVS early adopter. I kept everything in it - source code, tools, machine configurations, everything everything. I watched as Subversion was being built - which took a while - but even once it was clear that Subversion was now the thing to use, I didn't make the switch. I was happy with CVS. It did what I wanted.

Eventually, out of curiousity and (because there were RPM packages available so it was easy) I set up a Subversion server and migrated over one of my repositories. Within about half an hour I was moving directories around like a good 'un and kicking myself for not having looked at it years earlier.

I feel the same way about Spock. I've been using it for approximately an hour, and I can feel my Java TDD centre of gravity shifting. You can work quickly and accurately with it. There's so little scaffolding or boilerplate, you can whip up a new test or test suite in no time. The tests, sorry specifications, are clear and easy to read - consider this example

and then imagine the JUnit equivalent. Even with JUnit4 you'd have a mass of
assertEquals and duplication or a loop of some sort. There's some sophisticated stuff going on in the background and, bloody hell, doesn't it make the tests look great?

That's not even the best thing. What's best of all, I discover, is that because Spock is written in Groovy you really can write and run the test first before writing the thing under test. In Java (or C++ or C#) you can't really do that. You can kind of pretend, but you'll be hitting compile errors until you've at least written a stub. With Spock, you can (a lot of the time anyway) write the test, run it, see the error in the (wonderfully formatted) output and only then think about writing the code. It's a small thing, but it makes a much bigger difference that I'd ever have anticipated. I'm finally beginning to understand what Kent Beck and chums was so excited about all those years ago when they were first articulating what we now call TDD.