diff --git a/Library/Homebrew/test/dev-cmd/audit_spec.rb b/Library/Homebrew/test/dev-cmd/audit_spec.rb index 27560df7fc..d0f27dfe20 100644 --- a/Library/Homebrew/test/dev-cmd/audit_spec.rb +++ b/Library/Homebrew/test/dev-cmd/audit_spec.rb @@ -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