Skip to content

Commit

Permalink
test one strike
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jun 25, 2017
1 parent 644f4aa commit ad1fe74
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions game_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,16 @@ def test_all_spares
assert_equal(150, @game.score, "all spares wrong")
end

def test_one_strike
@game.add_roll(10)

@game.add_roll(5)
@game.add_roll(4)
(1..8).each do |roll|
@game.add_roll(0)
@game.add_roll(0)
end
assert_equal(28, @game.score, "simple strike, 2 non-spare balls, and gutters wrong")
end

end

0 comments on commit ad1fe74

Please sign in to comment.