Fix remaining local spec failures

This commit is contained in:
Douglas Eichelberger 2025-09-07 17:56:31 -07:00
parent 5b8d21c8cd
commit 78bb0d7942
No known key found for this signature in database
GPG Key ID: F90193CBD547EB81
4 changed files with 6 additions and 9 deletions

View File

@ -183,7 +183,7 @@ module Homebrew
require "bundle/tap_dumper"
@dsl ||= Brewfile.read(global:, file:)
kept_formulae = self.kept_formulae(global:, file:).filter_map(&method(:lookup_formula))
kept_formulae = self.kept_formulae(global:, file:).filter_map { lookup_formula(_1) }
kept_taps = @dsl.entries.select { |e| e.type == :tap }.map(&:name)
kept_taps += kept_formulae.filter_map(&:tap).map(&:name)
current_taps = Homebrew::Bundle::TapDumper.tap_names

View File

@ -45,7 +45,7 @@ class CaskDependent
)
end
sig { returns(T::Array[CaskDependent::Requirement]) }
sig { returns(T::Array[::Requirement]) }
def requirements
@requirements ||= T.let(
begin
@ -73,7 +73,7 @@ class CaskDependent
requirements
end,
T.nilable(T::Array[CaskDependent::Requirement]),
T.nilable(T::Array[::Requirement]),
)
end

View File

@ -430,7 +430,7 @@ RSpec.describe Homebrew::DevCmd::Bottle do
old_spec = BottleSpecification.new
old_spec.root_url("https://failbrew.bintray.com/bottles")
new_hash = { "root_url" => "https://testbrew.bintray.com/bottles" }
expect(homebrew.merge_bottle_spec(["root_url"], old_spec, new_hash)).to eq [
expect(homebrew.merge_bottle_spec([:root_url], old_spec, new_hash)).to eq [
['root_url: old: "https://failbrew.bintray.com/bottles", new: "https://testbrew.bintray.com/bottles"'],
[],
]

View File

@ -73,10 +73,7 @@ RSpec.describe CurlDownloadStrategy do
expect(strategy).to receive(:system_command)
.with(
/curl/,
hash_including(args: array_including_cons(
"--user-agent",
a_string_matching(/Mozilla.*Mac OS X 10_15_7.*AppleWebKit/),
)),
hash_including(args: array_including_cons("--user-agent", "fake")),
)
.at_least(:once)
.and_return(instance_double(SystemCommand::Result, success?: true, stdout: "", assert_success!: nil))
@ -173,7 +170,7 @@ RSpec.describe CurlDownloadStrategy do
hash_including(args: array_including_cons("#{artifact_domain}/#{resource_path}")),
)
.at_least(:once)
.and_return(SystemCommand::Result.new(["curl"], [""], status, secrets: []))
.and_return(SystemCommand::Result.new(["curl"], [[:stdout, ""]], status, secrets: []))
strategy.fetch
end