提交 d1aac885 编辑于 作者: XuehaiPan's avatar XuehaiPan
浏览文件

tests/utils/git_spec: update tests for `ensure_formula_installed!`

上级 9ef52080
......@@ -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!
......
......@@ -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"]
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册