Merge pull request #19379 from Homebrew/fix-formula-type
Fix return type of Formula.build
This commit is contained in:
commit
9cb5ecf8b3
@ -3703,7 +3703,7 @@ class Formula
|
|||||||
sig { params(block: T.proc.bind(BottleSpecification).void).void }
|
sig { params(block: T.proc.bind(BottleSpecification).void).void }
|
||||||
def bottle(&block) = stable.bottle(&block)
|
def bottle(&block) = stable.bottle(&block)
|
||||||
|
|
||||||
sig { returns(String) }
|
sig { returns(BuildOptions) }
|
||||||
def build = stable.build
|
def build = stable.build
|
||||||
|
|
||||||
# Get the `BUILD_FLAGS` from the formula's namespace set in `Formulary::load_formula`.
|
# Get the `BUILD_FLAGS` from the formula's namespace set in `Formulary::load_formula`.
|
||||||
|
|||||||
@ -549,6 +549,7 @@ RSpec.describe Formula do
|
|||||||
expect(f.homepage).to eq("https://brew.sh")
|
expect(f.homepage).to eq("https://brew.sh")
|
||||||
expect(f.version).to eq(Version.new("0.1"))
|
expect(f.version).to eq(Version.new("0.1"))
|
||||||
expect(f).to be_stable
|
expect(f).to be_stable
|
||||||
|
expect(f.build).to be_a(BuildOptions)
|
||||||
expect(f.stable.version).to eq(Version.new("0.1"))
|
expect(f.stable.version).to eq(Version.new("0.1"))
|
||||||
expect(f.head.version).to eq(Version.new("HEAD"))
|
expect(f.head.version).to eq(Version.new("HEAD"))
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user