diff options
| author | Bruce Steedman | 2016-09-30 18:41:54 +0100 |
|---|---|---|
| committer | Bruce Steedman | 2016-09-30 18:41:54 +0100 |
| commit | 540347a42c965362eb5f05b5cb178e181932380a (patch) | |
| tree | 57b2d859b00347d85631f445699f42eff3068f9b /Library | |
| parent | 41b2df8e338c3fe345afc89b1bb394e824213561 (diff) | |
| download | brew-540347a42c965362eb5f05b5cb178e181932380a.tar.bz2 | |
fix tests failing when verbose set
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/test/test_download_strategies.rb | 2 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_outdated.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_resource.rb | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/Library/Homebrew/test/test_download_strategies.rb b/Library/Homebrew/test/test_download_strategies.rb index 87218fb12..99c4ad1af 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 cc0f024c8..8ee3844df 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 c1b526cb2..c7f82a169 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) |
