Blob Blame History Raw
From 2fe4056a7dcf96dd894875b02032a988777e05d4 Mon Sep 17 00:00:00 2001
From: Chris Roberts <croberts@hashicorp.com>
Date: Mon, 14 Nov 2022 10:11:00 -0800
Subject: [PATCH] Fix test using `File.exists?` to use non-deprecated name

---
 test/unit/vagrant/util/install_cli_autocomplete_test.rb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/unit/vagrant/util/install_cli_autocomplete_test.rb b/test/unit/vagrant/util/install_cli_autocomplete_test.rb
index a62c065ddce..330b8b44805 100644
--- a/test/unit/vagrant/util/install_cli_autocomplete_test.rb
+++ b/test/unit/vagrant/util/install_cli_autocomplete_test.rb
@@ -12,7 +12,7 @@
 
   describe "#shell_installed" do
     it "should return path to config file if exists" do
-      allow(File).to receive(:exists?).with(target_file).and_return(true)
+      allow(File).to receive(:exist?).with(target_file).and_return(true)
       expect(subject.shell_installed(home)).to eq(target_file) 
     end
 
@@ -36,7 +36,7 @@
 
   describe "#install" do
     it "installs autocomplete" do
-      allow(File).to receive(:exists?).with(target_file).and_return(true)
+      allow(File).to receive(:exist?).with(target_file).and_return(true)
       allow(File).to receive(:foreach).with(target_file).and_yield("nothing")
       expect(File).to receive(:open).with(target_file, "a")
       subject.install(home)
@@ -67,4 +67,4 @@
       expect{ subject.install(["oops"]) }.to raise_error(ArgumentError)
     end
   end
-end
\ No newline at end of file
+end