fix tests failing when verbose set
This commit is contained in:
parent
41b2df8e33
commit
540347a42c
@ -22,11 +22,13 @@ class AbstractDownloadStrategyTests < Homebrew::TestCase
|
|||||||
|
|
||||||
def test_expand_safe_system_args_with_explicit_quiet_flag
|
def test_expand_safe_system_args_with_explicit_quiet_flag
|
||||||
@args << { quiet_flag: "--flag" }
|
@args << { quiet_flag: "--flag" }
|
||||||
|
ARGV.stubs(verbose?: false)
|
||||||
expanded_args = @strategy.expand_safe_system_args(@args)
|
expanded_args = @strategy.expand_safe_system_args(@args)
|
||||||
assert_equal %w[foo bar baz --flag], expanded_args
|
assert_equal %w[foo bar baz --flag], expanded_args
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_expand_safe_system_args_with_implicit_quiet_flag
|
def test_expand_safe_system_args_with_implicit_quiet_flag
|
||||||
|
ARGV.stubs(verbose?: false)
|
||||||
expanded_args = @strategy.expand_safe_system_args(@args)
|
expanded_args = @strategy.expand_safe_system_args(@args)
|
||||||
assert_equal %w[foo bar -q baz], expanded_args
|
assert_equal %w[foo bar -q baz], expanded_args
|
||||||
end
|
end
|
||||||
|
@ -5,6 +5,10 @@ class IntegrationCommandTestOutdated < IntegrationCommandTestCase
|
|||||||
setup_test_formula "testball"
|
setup_test_formula "testball"
|
||||||
(HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
|
(HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath
|
||||||
|
|
||||||
assert_equal "testball", cmd("outdated")
|
if ARGV.verbose?
|
||||||
|
assert_equal "testball (0.0.1) < 0.1", cmd("outdated")
|
||||||
|
else
|
||||||
|
assert_equal "testball", cmd("outdated")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -117,7 +117,7 @@ class ResourceTests < Homebrew::TestCase
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_verify_download_integrity_mismatch
|
def test_verify_download_integrity_mismatch
|
||||||
fn = stub(file?: true)
|
fn = stub(file?: true, basename: "Ftest")
|
||||||
checksum = @resource.sha256(TEST_SHA256)
|
checksum = @resource.sha256(TEST_SHA256)
|
||||||
|
|
||||||
fn.expects(:verify_checksum).with(checksum)
|
fn.expects(:verify_checksum).with(checksum)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user