Skip to content

Instantly share code, notes, and snippets.

@daniellevass
Created February 3, 2020 19:28
Show Gist options
  • Save daniellevass/4ea582e4fbbb72ebee1178f9b96cd04f to your computer and use it in GitHub Desktop.
Save daniellevass/4ea582e4fbbb72ebee1178f9b96cd04f to your computer and use it in GitHub Desktop.
spek medium post
describe("end to end flow of typical user") {
CurrentAccountImplementation.connect()
it("balance starts at 0") {
assertThat(CurrentAccountImplementation.getCurrentBalance()).isEqualTo(0)
}
it("balance is 10 when I add 10") {
CurrentAccountImplementation.addMoney(10)
assertThat(CurrentAccountImplementation.getCurrentBalance()).isEqualTo(10)
}
it("balance is 5 when I withdraw 5") {
CurrentAccountImplementation.takeMoney(5)
assertThat(CurrentAccountImplementation.getCurrentBalance()).isEqualTo(5)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment