bcalmac (9) [Avatar] Offline
The test examples from "Testing with Spock" look pretty simple. I'm interested to see how Spock deals with real-life, more complicated testing scenarios. What are some open source projects that embraced Spock and would be a good showcase for Spock capabilities?
Kostis Kapelonis (53) [Avatar] Offline

Chapter 3 of the book is actually an effort to present some more real-life examples. Have you looked at the nuclear reactor test?

It is very close to how a real Spock test would be written.

I also suppose you have seen the https://code.google.com/p/spock/wiki/WhoIsUsingSpock page.

Apart from the Groovy projects (that eat their own dog food) the most obvious high profile opensource project is Tapestry
Here is a small selection of their Spock tests.


Asgard from Netflix is another example

I have tried to find more open-source examples with a quick search, but most github projects are only experimenting with Spock. Some of them even use bad
practices that I mention as an anti-pattern in the book. So I would be very cautious with Spock tests found in the wild.

I will place a question in the Spock mailing list and get back to you with the results.

Hope that helps

Kostis Kapelonis (53) [Avatar] Offline
I asked also on the mailing list and Rob Fletcher (one of the Spock gurus) informed me that Spock is used in the MongoDB Java driver.

The code is available on Github


Because they have both JUnit and Spock tests, it is better to use the Github search interface.


I hope that I have answered your question smilie