Java Reference
In-Depth Information
cussions in this section), and you can immediately be productive. Spock provides both tests
and a solid mocking capability in an easy-to-use package.
ation” and “mock.” That may even be true. It seems more likely, however, that somebody
is that any discussion of the framework results in a series of
Star Trek
-related puns. My
15
Peter Niederweiser, who is active and helpful on the Spock email list.
16
Of which I totally approve.
17
For example, Spock is a
logical
framework for
enterprise
testing. Test well, and prosper. I have been, and always
shall be, your friendly testing framework.
6.4.1. The Search for Spock
The main site for Spock is
http://spockframework.org,
which actually redirects to a Google
code project at
https://code.google.com/p/spock/.
There you'll find wiki pages with lots of
good information. Like most cool projects these days, the source code is hosted at GitHub
at
https://github.com/spockframework/spock.
Youcanclonetherepositoryanddoamanual
build, or you can install the distribution from the standard Maven repository.
Spock versions are tied to Groovy versions. The latest release version of Spock is
18
Version 1.0 is due out by the time this topic appears in print.
19
The Spock plugin will be included in Grails by default starting in version 2.3.
The Gradle file in the next listing shows the appropriate dependencies to build this
chapter's source code.
Listing 6.25. Building and testing with Spock using Gradle
apply plugin: "groovy"
repositories {