diff --git a/Library/Homebrew/test/test_cmd_audit.rb b/Library/Homebrew/test/test_cmd_audit.rb index 20df333baa..16c0426edf 100644 --- a/Library/Homebrew/test/test_cmd_audit.rb +++ b/Library/Homebrew/test/test_cmd_audit.rb @@ -216,6 +216,9 @@ class FormulaAuditorTests < Homebrew::TestCase end def test_audit_class_github_gist_formula + needs_compat + require "compat/formula_specialties" + fa = formula_auditor "foo", <<-EOS.undent class Foo < GithubGistFormula url "http://example.com/foo-1.0.tgz" @@ -227,6 +230,9 @@ class FormulaAuditorTests < Homebrew::TestCase end def test_audit_class_script_file_formula + needs_compat + require "compat/formula_specialties" + fa = formula_auditor "foo", <<-EOS.undent class Foo < ScriptFileFormula url "http://example.com/foo-1.0.tgz" @@ -238,6 +244,9 @@ class FormulaAuditorTests < Homebrew::TestCase end def test_audit_class_aws_formula + needs_compat + require "compat/formula_specialties" + fa = formula_auditor "foo", <<-EOS.undent class Foo < AmazonWebServicesFormula url "http://example.com/foo-1.0.tgz" diff --git a/Library/Homebrew/test/testing_env.rb b/Library/Homebrew/test/testing_env.rb index bca841f7f3..2aaf20c3f0 100644 --- a/Library/Homebrew/test/testing_env.rb +++ b/Library/Homebrew/test/testing_env.rb @@ -93,6 +93,10 @@ module Homebrew Dir.mktmpdir(prefix_suffix, HOMEBREW_TEMP, &block) end + def needs_compat + skip "Requires compat/ code" if ENV["HOMEBREW_NO_COMPAT"] + end + def assert_nothing_raised yield end