diff --git a/Library/Homebrew/test/cmd/search_remote_tap_spec.rb b/Library/Homebrew/test/cmd/search_remote_tap_spec.rb new file mode 100644 index 0000000000..99c2cc20b5 --- /dev/null +++ b/Library/Homebrew/test/cmd/search_remote_tap_spec.rb @@ -0,0 +1,19 @@ +require "cmd/search" + +describe Homebrew do + specify "#search_tap" do + json_response = { + "tree" => [ + { + "path" => "Formula/not-a-formula.rb", + "type" => "blob", + }, + ], + } + + allow(GitHub).to receive(:open).and_yield(json_response) + + expect(described_class.search_tap("homebrew", "not-a-tap", "not-a-formula")) + .to eq(["homebrew/not-a-tap/not-a-formula"]) + end +end diff --git a/Library/Homebrew/test/search_remote_tap_test.rb b/Library/Homebrew/test/search_remote_tap_test.rb deleted file mode 100644 index 9dd9ee6544..0000000000 --- a/Library/Homebrew/test/search_remote_tap_test.rb +++ /dev/null @@ -1,19 +0,0 @@ -require "testing_env" -require "cmd/search" - -class SearchRemoteTapTests < Homebrew::TestCase - def test_search_remote_tap - json_response = { - "tree" => [ - { - "path" => "Formula/not-a-formula.rb", - "type" => "blob", - }, - ], - } - - GitHub.stubs(:open).yields(json_response) - - assert_equal ["homebrew/not-a-tap/not-a-formula"], Homebrew.search_tap("homebrew", "not-a-tap", "not-a-formula") - end -end