Skip to content

Instantly share code, notes, and snippets.

@hhariri
Created October 12, 2012 14:38
Show Gist options
  • Save hhariri/3879516 to your computer and use it in GitHub Desktop.
Save hhariri/3879516 to your computer and use it in GitHub Desktop.
spec public fun calculatorSpecs() {
var calculator: Calculator
var sum = 0
given("a calculator", { calculator = Calculator() })
on("calling sum with two numbers", {
sum = calculator.sum(2, 4)
})
it("should return the result of adding the first number to the second", {
shouldEqual(6, sum)
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment