Skip to content

Bowling: New descriptions from Canonical #716

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions exercises/bowling/bowling_test.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'minitest/autorun'
require_relative 'bowling'

# Common test data version: 1.0.0 3cf5eb9
# Common test data version: 1.0.1 26e345e
class BowlingTest < Minitest::Test
def setup
@game = Game.new
Expand Down Expand Up @@ -95,39 +95,39 @@ def test_all_strikes_is_a_perfect_game
assert_equal 300, @game.score
end

def test_rolls_can_not_score_negative_points
def test_rolls_cannot_score_negative_points
skip
record([])
assert_raises Game::BowlingError do
@game.roll(-1)
end
end

def test_a_roll_can_not_score_more_than_10_points
def test_a_roll_cannot_score_more_than_10_points
skip
record([])
assert_raises Game::BowlingError do
@game.roll(11)
end
end

def test_two_rolls_in_a_frame_can_not_score_more_than_10_points
def test_two_rolls_in_a_frame_cannot_score_more_than_10_points
skip
record([5])
assert_raises Game::BowlingError do
@game.roll(6)
end
end

def test_bonus_roll_after_a_strike_in_the_last_frame_can_not_score_more_than_10_points
def test_bonus_roll_after_a_strike_in_the_last_frame_cannot_score_more_than_10_points
skip
record([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10])
assert_raises Game::BowlingError do
@game.roll(11)
end
end

def test_two_bonus_rolls_after_a_strike_in_the_last_frame_can_not_score_more_than_10_points
def test_two_bonus_rolls_after_a_strike_in_the_last_frame_cannot_score_more_than_10_points
skip
record([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5])
assert_raises Game::BowlingError do
Expand All @@ -141,31 +141,31 @@ def test_two_bonus_rolls_after_a_strike_in_the_last_frame_can_score_more_than_10
assert_equal 26, @game.score
end

def test_the_second_bonus_rolls_after_a_strike_in_the_last_frame_can_not_be_a_strike_if_the_first_one_is_not_a_strike
def test_the_second_bonus_rolls_after_a_strike_in_the_last_frame_cannot_be_a_strike_if_the_first_one_is_not_a_strike
skip
record([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 6])
assert_raises Game::BowlingError do
@game.roll(10)
end
end

def test_second_bonus_roll_after_a_strike_in_the_last_frame_can_not_score_than_10_points
def test_second_bonus_roll_after_a_strike_in_the_last_frame_cannot_score_more_than_10_points
skip
record([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10])
assert_raises Game::BowlingError do
@game.roll(11)
end
end

def test_an_unstarted_game_can_not_be_scored
def test_an_unstarted_game_cannot_be_scored
skip
record([])
assert_raises Game::BowlingError do
@game.score
end
end

def test_an_incomplete_game_can_not_be_scored
def test_an_incomplete_game_cannot_be_scored
skip
record([0, 0])
assert_raises Game::BowlingError do
Expand Down