mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Fix caveats when loading from the API
This commit is contained in:
parent
0ea9f5ec80
commit
15cf890ed7
@ -203,7 +203,7 @@ module Formulary
|
||||
|
||||
@caveats_string = json_formula["caveats"]
|
||||
def caveats
|
||||
@caveats_string
|
||||
self.class.instance_variable_get(:@caveats_string)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -241,7 +241,7 @@ describe Formulary do
|
||||
"recommended_dependencies" => ["recommended_dep"],
|
||||
"optional_dependencies" => ["optional_dep"],
|
||||
"uses_from_macos" => ["uses_from_macos_dep"],
|
||||
"caveats" => "",
|
||||
"caveats" => "example caveat string",
|
||||
}.merge(extra_items),
|
||||
}
|
||||
end
|
||||
@ -276,6 +276,7 @@ describe Formulary do
|
||||
expect(formula.deps.count).to eq 5
|
||||
end
|
||||
expect(formula.uses_from_macos_elements).to eq ["uses_from_macos_dep"]
|
||||
expect(formula.caveats).to eq "example caveat string"
|
||||
expect {
|
||||
formula.install
|
||||
}.to raise_error("Cannot build from source from abstract formula.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user