delete verbose env vars in brew tests

This commit is contained in:
Bruce Steedman 2016-10-01 09:49:06 +01:00
parent df7246fdea
commit 15462cc817
3 changed files with 5 additions and 15 deletions

View File

@ -7,6 +7,8 @@ require "tap"
module Homebrew
def tests
(HOMEBREW_LIBRARY/"Homebrew").cd do
ENV.delete "HOMEBREW_VERBOSE"
ENV.delete "VERBOSE"
ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
ENV["HOMEBREW_DEVELOPER"] = "1"
ENV["TESTOPTS"] = "-v" if ARGV.verbose?

View File

@ -23,20 +23,12 @@ class AbstractDownloadStrategyTests < Homebrew::TestCase
def test_expand_safe_system_args_with_explicit_quiet_flag
@args << { quiet_flag: "--flag" }
expanded_args = @strategy.expand_safe_system_args(@args)
if ARGV.verbose?
assert_equal %w[foo bar baz], expanded_args
else
assert_equal %w[foo bar baz --flag], expanded_args
end
assert_equal %w[foo bar baz --flag], expanded_args
end
def test_expand_safe_system_args_with_implicit_quiet_flag
expanded_args = @strategy.expand_safe_system_args(@args)
if ARGV.verbose?
assert_equal %w[foo bar baz], expanded_args
else
assert_equal %w[foo bar -q baz], expanded_args
end
assert_equal %w[foo bar -q baz], expanded_args
end
def test_expand_safe_system_args_does_not_mutate_argument

View File

@ -5,10 +5,6 @@ class IntegrationCommandTestOutdated < IntegrationCommandTestCase
setup_test_formula "testball"
(HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
if ARGV.verbose?
assert_equal "testball (0.0.1) < 0.1", cmd("outdated")
else
assert_equal "testball", cmd("outdated")
end
assert_equal "testball", cmd("outdated")
end
end