Bring test suite line coverage to 100% - #2896
Closed
dblock wants to merge 1 commit into
Closed
Conversation
Danger ReportNo issues found. |
dblock
force-pushed
the
add-coverage-100
branch
from
September 4, 2026 10:35
bd75a35 to
3744309
Compare
dblock
commented
Sep 4, 2026
dblock
left a comment
Member
Author
There was a problem hiding this comment.
Flagging one change for @ericproulx to confirm intent (rest of the PR is coverage-only spec additions).
dblock
force-pushed
the
add-coverage-100
branch
4 times, most recently
from
September 4, 2026 10:45
fcb6cad to
fb38d72
Compare
This was referenced Sep 4, 2026
dblock
force-pushed
the
add-coverage-100
branch
3 times, most recently
from
September 5, 2026 21:30
16f0599 to
f794e76
Compare
Add specs for previously-untested classes/methods and branches across the middleware, router, serve_stream, util, validations and exceptions namespaces. Also remove a structurally unreachable "format not supported" throw in Grape::Middleware::Error#format_message: formatter_for always falls back to a registered Txt formatter (registered via ErrorFormatter::Base.inherited), so `formatter` can never be falsy and the 406 branch could never execute. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dblock
force-pushed
the
add-coverage-100
branch
from
September 5, 2026 21:33
f794e76 to
4c503ca
Compare
ericproulx
approved these changes
Sep 6, 2026
Contributor
|
Committed through #2897 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Brings line coverage of the test suite to 100% (up from ~98.3%/93.0%).
Adds specs for previously-untested classes/methods and branches across the middleware, router, serve_stream, util, validations and exceptions namespaces.
Marks two branches that appear structurally unreachable through the public API with a
# simplecov:disable/# simplecov:enableblock and an explanatory comment (see inline PR comment tagging @ericproulx to confirm before anything is actually removed):Grape::Middleware::Error#format_message's 406 "format not supported" throw, sinceGrape::ErrorFormatter.formatter_foralways falls back to a registeredTxtformatter (Grape::ErrorFormatter::Base.inheritedregisters every formatter subclass, includingTxt), soformattercan never be falsy.Grape::Router::Route#tag_utf8!'selsebranch, since Mustermann'sPattern#paramsonly ever returnsString/Arraycaptures, and the only caller filters outnilfirst.Branch coverage improved from 92.97% to 93.94% along the way, but was not brought to 100% as part of this PR given the scope of the remaining work.
Verification
bundle exec rspec- full suite, 0 failuresbundle exec rubocop- clean