Skip to content

sorbet: Add shims for methods in the 'integration test' shared context#22481

Merged
issyl0 merged 2 commits into
mainfrom
sorbet-integration-test-method-shims
May 31, 2026
Merged

sorbet: Add shims for methods in the 'integration test' shared context#22481
issyl0 merged 2 commits into
mainfrom
sorbet-integration-test-method-shims

Conversation

@issyl0
Copy link
Copy Markdown
Member

@issyl0 issyl0 commented May 31, 2026


  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them? Performance claims (e.g. "this is faster") must include Hyperfine benchmarks.
  • Have you written new tests (excluding integration tests) for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR.

  • These are all included in specs via config.include_context at the end of test/support/helper/spec/shared_context/integration_test.rb.

- These are all included in specs via `config.include_context` at the
  end of `test/support/helper/spec/shared_context/integration_test.rb`.
Copy link
Copy Markdown
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks again, looks good when 🟢!

@issyl0 issyl0 marked this pull request as ready for review May 31, 2026 14:05
Copilot AI review requested due to automatic review settings May 31, 2026 14:05
@issyl0 issyl0 enabled auto-merge May 31, 2026 14:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: false to # typed: true or # 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

Comment thread Library/Homebrew/sorbet/rbi/shims/rspec.rbi Outdated
Comment thread Library/Homebrew/sorbet/rbi/shims/rspec.rbi Outdated
@github-code-quality
Copy link
Copy Markdown

github-code-quality Bot commented May 31, 2026

Code Coverage Overview

Languages: Ruby

Ruby / code-coverage/simplecov

The overall coverage in the branch is 75%. The coverage in the branch is 78%.

Show a code coverage summary of the most impacted files.
File 9e7331e 579e899 +/-
cask/info.rb 96% 0% -96%
cask/installer.rb 91% 28% -63%
cask/artifact/a...ct_uninstall.rb 89% 32% -57%
cask/audit.rb 63% 25% -38%
cask/cask_loader.rb 96% 65% -31%
bundle/extensions/flatpak.rb 37% 94% +57%
extend/os/linux/diagnostic.rb 0% 67% +67%
os/linux/elf.rb 0% 86% +86%
extend/os/linux/sandbox.rb 0% 95% +95%
extend/os/linux...ystem_config.rb 0% 99% +99%

Updated May 31, 2026 14:38 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

- I didn't look hard enough at all the usages in all of the tests.
- #22481 (comment)
- #22481 (comment)
@issyl0 issyl0 added this pull request to the merge queue May 31, 2026
Merged via the queue into main with commit dd24b11 May 31, 2026
38 checks passed
@issyl0 issyl0 deleted the sorbet-integration-test-method-shims branch May 31, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants