Skip to content

Instantly share code, notes, and snippets.

@fmamud
Last active October 14, 2016 03:50
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/5ba48f9490ccfaab9e33fbea9e607591 to your computer and use it in GitHub Desktop.
Save fmamud/5ba48f9490ccfaab9e33fbea9e607591 to your computer and use it in GitHub Desktop.
First method in Spock Specification
import spock.lang.*
class MySpec extends Specification {
def "should return 4 after list sum"() {
given:
List<Integer> list = new ArrayList<>()
when:
list.add(2)
then:
4 == list.sum()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment