Skip to content

Instantly share code, notes, and snippets.

@xala3pa
Last active January 30, 2016 18:20
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 xala3pa/71aecb580ddad7624c07 to your computer and use it in GitHub Desktop.
Save xala3pa/71aecb580ddad7624c07 to your computer and use it in GitHub Desktop.
import spock.lang.Specification;
import com.xala3pa.Calculator
class calculatorSpec extends Specification {
def "Add 3 and 4 to get the correct result"() {
given: "A calculator"
def calculator = new Calculator()
when: "Add 3 and 4"
def result = calculator.add(3, 4)
then: "Get the correct result"
result == 7
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment