From 74a53950f0b06f3cc3541151315b47ad30d67aba Mon Sep 17 00:00:00 2001 From: = Date: Sat, 24 Jun 2017 21:12:15 -0600 Subject: [PATCH] test single spare roll --- game_test.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/game_test.rb b/game_test.rb index b0be7ad..7dbb35c 100644 --- a/game_test.rb +++ b/game_test.rb @@ -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