Skip to content
Snippets Groups Projects
Commit d0998a49 authored by Baptiste Fontaine's avatar Baptiste Fontaine
Browse files

testing_env: needs_compat utility added


Closes Homebrew/homebrew#48302.

Signed-off-by: default avatarBaptiste Fontaine <batifon@yahoo.fr>
parent 7b4c43e5
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment