aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/cmd/search_remote_tap_spec.rb
blob: 99c2cc20b59a397c4cc043a64ac32de94237f70b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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