Cleanup brew style --fix suggestions

This commit is contained in:
Rylan Polster 2022-02-11 10:45:51 -05:00
parent 37fd64b5a3
commit e5e4c288be
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -854,12 +854,18 @@ module Homebrew
end
describe "#audit_revision_and_version_scheme" do
let(:formula_path) { tap_path/formula_subpath }
let(:tap_path) { Tap::TAP_DIRECTORY/"homebrew/homebrew-bar" }
let(:origin_formula_path) { origin_tap_path/formula_subpath }
let(:formula_subpath) { "Formula/foo#{foo_version}.rb" }
let(:foo_version) { Count.increment }
subject {
fa = described_class.new(Formulary.factory(formula_path), git: true)
fa.audit_revision_and_version_scheme
fa.problems.first&.fetch(:message)
}
let(:origin_tap_path) { Tap::TAP_DIRECTORY/"homebrew/homebrew-foo" }
let(:foo_version) { Count.increment }
let(:formula_subpath) { "Formula/foo#{foo_version}.rb" }
let(:origin_formula_path) { origin_tap_path/formula_subpath }
let(:tap_path) { Tap::TAP_DIRECTORY/"homebrew/homebrew-bar" }
let(:formula_path) { tap_path/formula_subpath }
before do
origin_formula_path.dirname.mkpath
@ -902,12 +908,6 @@ module Homebrew
end
end
subject {
fa = described_class.new(Formulary.factory(formula_path), git: true)
fa.audit_revision_and_version_scheme
fa.problems.first&.fetch(:message)
}
def formula_gsub(before, after = "")
text = formula_path.read
text.gsub! before, after