From 81b034a577e9847b7d0db00b4f014216a4e06dae Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 29 Jul 2016 17:22:12 -0600 Subject: [PATCH] test_cmd_audit: don't print compat warnings. --- Library/Homebrew/test/test_cmd_audit.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/test/test_cmd_audit.rb b/Library/Homebrew/test/test_cmd_audit.rb index b5ec51bfee..f9056d0da6 100644 --- a/Library/Homebrew/test/test_cmd_audit.rb +++ b/Library/Homebrew/test/test_cmd_audit.rb @@ -254,11 +254,14 @@ class FormulaAuditorTests < Homebrew::TestCase needs_compat require "compat/formula_specialties" - fa = formula_auditor "foo", <<-EOS.undent - class Foo < GithubGistFormula - url "http://example.com/foo-1.0.tgz" - end - EOS + ARGV.stubs(:homebrew_developer?).returns false + fa = shutup do + formula_auditor "foo", <<-EOS.undent + class Foo < GithubGistFormula + url "http://example.com/foo-1.0.tgz" + end + EOS + end fa.audit_class assert_equal ["GithubGistFormula is deprecated, use Formula instead"], fa.problems @@ -268,6 +271,7 @@ class FormulaAuditorTests < Homebrew::TestCase needs_compat require "compat/formula_specialties" + ARGV.stubs(:homebrew_developer?).returns false fa = formula_auditor "foo", <<-EOS.undent class Foo < ScriptFileFormula url "http://example.com/foo-1.0.tgz" @@ -282,6 +286,7 @@ class FormulaAuditorTests < Homebrew::TestCase needs_compat require "compat/formula_specialties" + ARGV.stubs(:homebrew_developer?).returns false fa = formula_auditor "foo", <<-EOS.undent class Foo < AmazonWebServicesFormula url "http://example.com/foo-1.0.tgz"