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 <martin@afanasjew.de>
This commit is contained in:
Martin Afanasjew 2016-01-04 15:03:19 +01:00
parent bd4f633673
commit c5f0003061

View File

@ -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