Tutorial by Examples

Spock framework information can be found at the Spock website. There are basically three ways to use Spock in Groovy as a dependency using the Grape dependency manager : Add the following to your groovy script. @Grab(group='org.spockframework', module='spock-core', version='1.1-groovy-2.4.1'...
import spock.lang.* class HelloWorldSpec extends Specification { @Shared message = 'Hello world!' def "The world can say hello using when and then"() { when: def newMessage = message then: newMessage == 'Hello world!' } ...

Page 1 of 1