rubocops: test whitelists.
This commit is contained in:
parent
45908d8ff2
commit
56c02485e0
@ -26,4 +26,6 @@ describe RuboCop::Cop::FormulaAudit::Conflicts do
|
||||
RUBY
|
||||
end
|
||||
end
|
||||
|
||||
include_examples "formulae exist", described_class::WHITELIST
|
||||
end
|
||||
|
||||
@ -860,4 +860,6 @@ describe RuboCop::Cop::FormulaAudit::Miscellaneous do
|
||||
RUBY
|
||||
end
|
||||
end
|
||||
|
||||
include_examples "formulae exist", described_class::MAKE_CHECK_WHITELIST
|
||||
end
|
||||
|
||||
@ -218,6 +218,8 @@ describe RuboCop::Cop::FormulaAudit::Urls do
|
||||
RUBY
|
||||
end
|
||||
end
|
||||
|
||||
include_examples "formulae exist", described_class::BINARY_BOOTSTRAP_FORMULA_URLS_WHITELIST
|
||||
end
|
||||
|
||||
describe RuboCop::Cop::FormulaAudit::PyPiUrls do
|
||||
|
||||
@ -16,4 +16,6 @@ describe RuboCop::Cop::FormulaAudit::UsesFromMacos do
|
||||
end
|
||||
RUBY
|
||||
end
|
||||
|
||||
include_examples "formulae exist", described_class::ALLOWED_USES_FROM_MACOS_DEPS
|
||||
end
|
||||
|
||||
@ -52,6 +52,7 @@ require "test/support/helper/output_as_tty"
|
||||
|
||||
require "test/support/helper/spec/shared_context/homebrew_cask" if OS.mac?
|
||||
require "test/support/helper/spec/shared_context/integration_test"
|
||||
require "test/support/helper/spec/shared_examples/formulae_exist"
|
||||
|
||||
TEST_DIRECTORIES = [
|
||||
CoreTap.instance.path/"Formula",
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
shared_examples "formulae exist" do |array|
|
||||
array.each do |f|
|
||||
it "#{f} formula exists" do
|
||||
formula_path = Pathname("#{HOMEBREW_LIBRARY_PATH}/../Taps/homebrew/homebrew-core/Formula/#{f}.rb")
|
||||
expect(formula_path.exist?).to be true
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -17,7 +17,7 @@ TEST_TMPDIR = ENV.fetch("HOMEBREW_TEST_TMPDIR") do |k|
|
||||
end.freeze
|
||||
|
||||
# Paths pointing into the Homebrew code base that persist across test runs
|
||||
HOMEBREW_SHIMS_PATH = (HOMEBREW_LIBRARY_PATH.parent/"Homebrew/shims").freeze
|
||||
HOMEBREW_SHIMS_PATH = (HOMEBREW_LIBRARY_PATH/"shims").freeze
|
||||
|
||||
require "extend/git_repository"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user