testing_env: needs_compat utility added
Closes Homebrew/homebrew#48302. Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
This commit is contained in:
parent
7b4c43e512
commit
d0998a4907
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user