Fix test failure
This commit is contained in:
parent
0fd3b8e4af
commit
fd80dd9eef
@ -186,7 +186,10 @@ RSpec.describe Utils::Git do
|
|||||||
unless ENV["HOMEBREW_TEST_GENERIC_OS"]
|
unless ENV["HOMEBREW_TEST_GENERIC_OS"]
|
||||||
it "installs git" do
|
it "installs git" do
|
||||||
expect(described_class).to receive(:available?).and_return(false)
|
expect(described_class).to receive(:available?).and_return(false)
|
||||||
allow_any_instance_of(Formula).to receive(:ensure_installed!)
|
allow(CoreTap.instance).to receive(:installed?).and_return(true)
|
||||||
|
formula_double = instance_double(Formula)
|
||||||
|
allow(Formula).to receive(:[]).with("git").and_return(formula_double)
|
||||||
|
allow(formula_double).to receive(:ensure_installed!).and_return(formula_double)
|
||||||
expect(described_class).to receive(:available?).and_return(true)
|
expect(described_class).to receive(:available?).and_return(true)
|
||||||
|
|
||||||
described_class.ensure_installed!
|
described_class.ensure_installed!
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user