Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
3b557e0
Project setup
wimdavies May 24, 2023
931c7c8
test-driving Frame class
wimdavies May 24, 2023
1cd89d9
test-drove Frame class with #is_strike? and #is_spare?
wimdavies May 24, 2023
3a9e336
test-drove basic zero return for Gutter Game
wimdavies May 25, 2023
30918f3
Test-drove frame naming, marking standard frames complete, ten frame …
wimdavies May 26, 2023
f611c5b
major rework from ScoreCard#add_roll to #init with 10 numbered frames…
wimdavies May 26, 2023
d28af4f
testdrove #calculate_bonus_scores for spares on regular frames; major…
wimdavies May 27, 2023
545fcc3
wrote test for bonus from ninth-frame spare. NB: bonuses only calcula…
wimdavies May 27, 2023
bbf4f0b
midway through test writing for strike bonuses: fixed error in #calcu…
wimdavies May 29, 2023
6d61aa3
testdrove bonus score for both cases of regular frame strike
wimdavies May 29, 2023
36d3b26
Testdrove Frame#is_spare? case for returning false when first roll is…
wimdavies May 29, 2023
fbe8f0e
testdrove Frame#calculate_frame_score to account for bonus roll exist…
wimdavies May 29, 2023
6d766fd
big test-drive of completion conditions; refactored by extracting thi…
wimdavies May 29, 2023
81e3093
testdriving bonus scoring for ninth frame; game score test writing
wimdavies May 29, 2023
f3da38c
Major refactor of roll_current_frame, and bonus conditionals
wimdavies May 29, 2023
49e1771
testdrove calculate_game_score method. Done
wimdavies May 29, 2023
201d216
Added simplecov and cobertura
wimdavies May 29, 2023
ef72cca
100% code coverage with simplecov and simplecov-cobertura gems installed
wimdavies May 30, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scratchpad.rb
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
11 changes: 11 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

source "https://rubygems.org"

# gem "rails"

gem "rspec", "~> 3.12"

gem "simplecov", "~> 0.22.0"

gem "simplecov-cobertura", "~> 2.1"
39 changes: 39 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.5.0)
docile (1.4.0)
rexml (3.2.5)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-cobertura (2.1.0)
rexml
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)

PLATFORMS
arm64-darwin-22

DEPENDENCIES
rspec (~> 3.12)
simplecov (~> 0.22.0)
simplecov-cobertura (~> 2.1)

BUNDLED WITH
2.4.13
5 changes: 5 additions & 0 deletions coverage/.last_run.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"result": {
"line": 100.0
}
}
Loading