Blame vagrant-2.2.3-ruby32-File_exists-removal-zsh-test.patch
|
|
43092b8 |
From 2fe4056a7dcf96dd894875b02032a988777e05d4 Mon Sep 17 00:00:00 2001
|
|
|
43092b8 |
From: Chris Roberts <croberts@hashicorp.com>
|
|
|
43092b8 |
Date: Mon, 14 Nov 2022 10:11:00 -0800
|
|
|
43092b8 |
Subject: [PATCH] Fix test using `File.exists?` to use non-deprecated name
|
|
|
43092b8 |
|
|
|
43092b8 |
---
|
|
|
43092b8 |
test/unit/vagrant/util/install_cli_autocomplete_test.rb | 6 +++---
|
|
|
43092b8 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
43092b8 |
|
|
|
43092b8 |
diff --git a/test/unit/vagrant/util/install_cli_autocomplete_test.rb b/test/unit/vagrant/util/install_cli_autocomplete_test.rb
|
|
|
43092b8 |
index a62c065ddce..330b8b44805 100644
|
|
|
43092b8 |
--- a/test/unit/vagrant/util/install_cli_autocomplete_test.rb
|
|
|
43092b8 |
+++ b/test/unit/vagrant/util/install_cli_autocomplete_test.rb
|
|
|
43092b8 |
@@ -12,7 +12,7 @@
|
|
|
43092b8 |
|
|
|
43092b8 |
describe "#shell_installed" do
|
|
|
43092b8 |
it "should return path to config file if exists" do
|
|
|
43092b8 |
- allow(File).to receive(:exists?).with(target_file).and_return(true)
|
|
|
43092b8 |
+ allow(File).to receive(:exist?).with(target_file).and_return(true)
|
|
|
43092b8 |
expect(subject.shell_installed(home)).to eq(target_file)
|
|
|
43092b8 |
end
|
|
|
43092b8 |
|
|
|
43092b8 |
@@ -36,7 +36,7 @@
|
|
|
43092b8 |
|
|
|
43092b8 |
describe "#install" do
|
|
|
43092b8 |
it "installs autocomplete" do
|
|
|
43092b8 |
- allow(File).to receive(:exists?).with(target_file).and_return(true)
|
|
|
43092b8 |
+ allow(File).to receive(:exist?).with(target_file).and_return(true)
|
|
|
43092b8 |
allow(File).to receive(:foreach).with(target_file).and_yield("nothing")
|
|
|
43092b8 |
expect(File).to receive(:open).with(target_file, "a")
|
|
|
43092b8 |
subject.install(home)
|
|
|
43092b8 |
@@ -67,4 +67,4 @@
|
|
|
43092b8 |
expect{ subject.install(["oops"]) }.to raise_error(ArgumentError)
|
|
|
43092b8 |
end
|
|
|
43092b8 |
end
|
|
|
43092b8 |
-end
|
|
|
43092b8 |
\ No newline at end of file
|
|
|
43092b8 |
+end
|