sorbet: Add shims for methods in the 'integration test' shared context#22481
Merged
Conversation
- These are all included in specs via `config.include_context` at the end of `test/support/helper/spec/shared_context/integration_test.rb`.
MikeMcQuaid
approved these changes
May 31, 2026
Member
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Thanks again, looks good when 🟢!
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands Sorbet coverage for Homebrew specs that use the integration-test shared context by adding RSpec shims and re-enabling typed checking for several spec files.
Changes:
- Adds RBI declarations for integration-test helper methods on
RSpec::Core::ExampleGroup. - Changes selected command/dev-command specs from
# typed: falseto# typed: trueor# typed: strict.
Show a summary per file
| File | Description |
|---|---|
Library/Homebrew/sorbet/rbi/shims/rspec.rbi |
Adds Sorbet shims for integration-test shared-context helpers. |
Library/Homebrew/test/cmd/command_spec.rb |
Enables strict Sorbet checking. |
Library/Homebrew/test/cmd/exec_spec.rb |
Enables Sorbet checking. |
Library/Homebrew/test/cmd/mcp-server_spec.rb |
Enables strict Sorbet checking. |
Library/Homebrew/test/cmd/tap_spec.rb |
Enables strict Sorbet checking. |
Library/Homebrew/test/cmd/trust_spec.rb |
Enables strict Sorbet checking. |
Library/Homebrew/test/cmd/untrust_spec.rb |
Enables strict Sorbet checking. |
Library/Homebrew/test/dev-cmd/create_spec.rb |
Enables Sorbet checking. |
Library/Homebrew/test/dev-cmd/which-update_spec.rb |
Enables Sorbet checking. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Files not reviewed (1)
- Library/Homebrew/sorbet/rbi/shims/rspec.rbi: Language not supported
- Files reviewed: 8/9 changed files
- Comments generated: 2
Code Coverage OverviewLanguages: Ruby Ruby / code-coverage/simplecovThe overall coverage in the branch is 75%. The coverage in the branch is 78%. Show a code coverage summary of the most impacted files.
Updated |
- I didn't look hard enough at all the usages in all of the tests. - #22481 (comment) - #22481 (comment)
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.
brew lgtm(style, typechecking and tests) with your changes locally?config.include_contextat the end oftest/support/helper/spec/shared_context/integration_test.rb.