Created
June 15, 2012 19:37
-
-
Save superchris/2938353 to your computer and use it in GitHub Desktop.
bowling kata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "bowling", -> | |
beforeEach -> | |
@game = new Game | |
describe "no spare or strike", -> | |
beforeEach -> | |
@game.roll(3) | |
@game.roll(4) | |
@game.roll(7) | |
it "should calculate the score", -> | |
expect(@game.score()).toEqual 14 | |
describe "with a spare", -> | |
beforeEach -> | |
@game.roll(6) | |
@game.roll(4) | |
@game.roll(7) | |
it "should add the next roll after spare", -> | |
expect(@game.score()).toEqual 24 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "bowling", -> | |
beforeEach -> | |
@game = new Game | |
describe "no spare or strike", -> | |
beforeEach -> | |
@game.roll(3) | |
@game.roll(4) | |
@game.roll(7) | |
it "should calculate the score", -> | |
expect(@game.score()).toEqual 14 | |
describe "with a spare", -> | |
beforeEach -> | |
@game.roll(6) | |
@game.roll(4) | |
@game.roll(7) | |
it "should add the next roll after spare", -> | |
expect(@game.score()).toEqual 24 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment