Skip to content

Commit

Permalink
test single spare roll
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jun 25, 2017
1 parent 406e3a9 commit 74a5395
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions game_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,17 @@ def test_various_non_strike_or_spare_rolls
@game.reset
end
end

def test_one_spare
@game.add_roll(5)
@game.add_roll(5)
@game.add_roll(5)
@game.add_roll(0)
(1..8).each do |roll|
@game.add_roll(0)
@game.add_roll(0)
end
assert_equal(20, @game.score, "simple spare and gutters wrong")
end

end

0 comments on commit 74a5395

Please sign in to comment.