diff --git a/test/bowling_game_test.dart b/test/bowling_game_test.dart index 870b869..c278f51 100644 --- a/test/bowling_game_test.dart +++ b/test/bowling_game_test.dart @@ -24,5 +24,14 @@ void main() { rollMany(20, 1); expect(game.score(), 20); }); + + test('one spare', () { + game.roll(5); + game.roll(5); // spare + game.roll(3); // bonus for spare + rollMany(17, 0); // rest are gutter balls + + expect(game.score(), 16); // 10 (spare) + 3 (bonus) + 3 (normal roll) + }); }); }