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.
This commit is contained in:
Misty De Meo 2017-08-31 22:29:36 -07:00
parent b2cd52d0b7
commit a26cde8299
No known key found for this signature in database
GPG Key ID: 76CF846A2F674B2C

View File

@ -2,6 +2,9 @@ require "cmd/search"
describe Homebrew do describe Homebrew do
specify "#search_taps" do specify "#search_taps" do
# Otherwise the tested method returns [], regardless of our stub
ENV.delete("HOMEBREW_NO_GITHUB_API")
json_response = { json_response = {
"items" => [ "items" => [
{ {