diff --git a/Library/Homebrew/test/test_download_strategies.rb b/Library/Homebrew/test/test_download_strategies.rb index 87218fb12b..99c4ad1af2 100644 --- a/Library/Homebrew/test/test_download_strategies.rb +++ b/Library/Homebrew/test/test_download_strategies.rb @@ -22,11 +22,13 @@ class AbstractDownloadStrategyTests < Homebrew::TestCase def test_expand_safe_system_args_with_explicit_quiet_flag @args << { quiet_flag: "--flag" } + ARGV.stubs(verbose?: false) expanded_args = @strategy.expand_safe_system_args(@args) assert_equal %w[foo bar baz --flag], expanded_args end def test_expand_safe_system_args_with_implicit_quiet_flag + ARGV.stubs(verbose?: false) expanded_args = @strategy.expand_safe_system_args(@args) assert_equal %w[foo bar -q baz], expanded_args end diff --git a/Library/Homebrew/test/test_outdated.rb b/Library/Homebrew/test/test_outdated.rb index cc0f024c8d..8ee3844df4 100644 --- a/Library/Homebrew/test/test_outdated.rb +++ b/Library/Homebrew/test/test_outdated.rb @@ -5,6 +5,10 @@ class IntegrationCommandTestOutdated < IntegrationCommandTestCase setup_test_formula "testball" (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 diff --git a/Library/Homebrew/test/test_resource.rb b/Library/Homebrew/test/test_resource.rb index c1b526cb2c..c7f82a169b 100644 --- a/Library/Homebrew/test/test_resource.rb +++ b/Library/Homebrew/test/test_resource.rb @@ -117,7 +117,7 @@ class ResourceTests < Homebrew::TestCase end def test_verify_download_integrity_mismatch - fn = stub(file?: true) + fn = stub(file?: true, basename: "Ftest") checksum = @resource.sha256(TEST_SHA256) fn.expects(:verify_checksum).with(checksum)