test/search: Fix stubbing of GitHub::API.open_rest call
Test failure:
```
Failure/Error:
expect(described_class.search_taps("some-formula"))
.to match(formulae: ["homebrew/foo/some-formula"], casks: ["homebrew/bar/some-cask"])
GitHub::API asked to yield |[{"items"=>[{"path"=>"Formula/some-formula.rb", "repository"=>{"full_name"=>"Homebrew/homebrew-foo"}}, {"path"=>"Casks/some-cask.rb", "repository"=>{"full_name"=>"Homebrew/homebrew-bar"}}]}]| but no block was passed
```
This commit is contained in:
parent
8c75eab88a
commit
1edb59e086
@ -39,7 +39,7 @@ describe Homebrew::Search do
|
||||
],
|
||||
}
|
||||
|
||||
allow(GitHub::API).to receive(:open_rest).and_yield(json_response)
|
||||
allow(GitHub::API).to receive(:open_rest).and_return(json_response)
|
||||
|
||||
expect(described_class.search_taps("some-formula"))
|
||||
.to match(formulae: ["homebrew/foo/some-formula"], casks: ["homebrew/bar/some-cask"])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user