From a26cde8299c998043bf7073341b029b609135e8a Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Thu, 31 Aug 2017 22:29:36 -0700 Subject: [PATCH] search_remote_tap spec: fix test offline Even though we stub the JSON response, the method being tested always returns [] immediately if HOMEBREW_NO_GITHUB_API is set. --- Library/Homebrew/test/cmd/search_remote_tap_spec.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Library/Homebrew/test/cmd/search_remote_tap_spec.rb b/Library/Homebrew/test/cmd/search_remote_tap_spec.rb index b0beb122c4..eb256b9245 100644 --- a/Library/Homebrew/test/cmd/search_remote_tap_spec.rb +++ b/Library/Homebrew/test/cmd/search_remote_tap_spec.rb @@ -2,6 +2,9 @@ require "cmd/search" describe Homebrew do specify "#search_taps" do + # Otherwise the tested method returns [], regardless of our stub + ENV.delete("HOMEBREW_NO_GITHUB_API") + json_response = { "items" => [ {