diff --git a/Library/Homebrew/test/utils/git_spec.rb b/Library/Homebrew/test/utils/git_spec.rb index 8b8d1ae6d7..20bc7fddab 100644 --- a/Library/Homebrew/test/utils/git_spec.rb +++ b/Library/Homebrew/test/utils/git_spec.rb @@ -184,7 +184,7 @@ describe Utils::Git do unless ENV["HOMEBREW_TEST_GENERIC_OS"] it "installs git" do expect(described_class).to receive(:available?).and_return(false) - expect(described_class).to receive(:safe_system).with(HOMEBREW_BREW_FILE, "install", "git").and_return(true) + expect(described_class).to receive(:ensure_formula_installed!).with("git") expect(described_class).to receive(:available?).and_return(true) described_class.ensure_installed! diff --git a/Library/Homebrew/utils/git.rb b/Library/Homebrew/utils/git.rb index 9a8d2da8b1..8fbe90de34 100644 --- a/Library/Homebrew/utils/git.rb +++ b/Library/Homebrew/utils/git.rb @@ -94,8 +94,6 @@ module Utils # we cannot install brewed git if homebrew/core is unavailable. if CoreTap.instance.installed? begin - oh1 "Installing #{Formatter.identifier("git")}" - # Otherwise `git` will be installed from source in tests that need it. This is slow # and will also likely fail due to `OS::Linux` and `OS::Mac` being undefined. raise "Refusing to install Git on a generic OS." if ENV["HOMEBREW_TEST_GENERIC_OS"]