Skip to content

Instantly share code, notes, and snippets.

@fmamud
Created October 14, 2016 03:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fmamud/9bbcb96924a451964832b0d08ffab2bb to your computer and use it in GitHub Desktop.
Save fmamud/9bbcb96924a451964832b0d08ffab2bb to your computer and use it in GitHub Desktop.
Expect and Setup sections in Spock Specification
import spock.lang.*
class MySpec extends Specification {
def "should return 4 after list sum"() {
setup:
def list = [2, 2]
expect:
4 == list.sum()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment