attestation_spec: simplify gh_executable test

Signed-off-by: William Woodruff <william@yossarian.net>
This commit is contained in:
William Woodruff 2024-04-10 18:02:56 -04:00
parent 990b7d77d6
commit 480e48b75d
No known key found for this signature in database

View File

@ -11,13 +11,12 @@ RSpec.describe Homebrew::Attestation do
let(:fake_bottle) { instance_double(Bottle, cached_download:) } let(:fake_bottle) { instance_double(Bottle, cached_download:) }
describe "::gh_executable" do describe "::gh_executable" do
before do it "calls ensure_executable" do
allow(attestation).to receive(:ensure_executable!) expect(attestation).to receive(:ensure_executable!)
.with("gh")
.and_return(fake_gh) .and_return(fake_gh)
end
it "returns a path to a gh executable" do attestation.gh_executable
attestation.gh_executable == fake_gh
end end
end end