From c5f0003061c6ddb76dd672501ecc58b5476a62fb Mon Sep 17 00:00:00 2001 From: Martin Afanasjew Date: Mon, 4 Jan 2016 15:03:19 +0100 Subject: [PATCH] test: don't fail if GitHub API is unavailable Tests shouldn't fail in case of an unavailable network or a deliberately disabled access to the GitHub API. Closes Homebrew/homebrew#47670. Signed-off-by: Martin Afanasjew --- Library/Homebrew/test/test_tap.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/test/test_tap.rb b/Library/Homebrew/test/test_tap.rb index bd329c1d20..46e14017dc 100644 --- a/Library/Homebrew/test/test_tap.rb +++ b/Library/Homebrew/test/test_tap.rb @@ -5,6 +5,7 @@ class TapTest < Homebrew::TestCase @path = Tap::TAP_DIRECTORY/"homebrew/homebrew-foo" @path.mkpath @tap = Tap.new("Homebrew", "foo") + @tap.stubs(:private?).returns(true) if ENV["HOMEBREW_NO_GITHUB_API"] end def setup_tap_files