summaryrefslogtreecommitdiff
path: root/spec/unit/knife/core
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-08-11 13:30:10 -0700
committerTim Smith <tsmith84@gmail.com>2020-08-12 14:02:34 -0700
commit4848c89b7cc5e4a4d4fac7c8bff962f7df69f719 (patch)
treecf1bc6d0b30f226573da88158049f1334b6ce1bd /spec/unit/knife/core
parent798cac61accc035b51aaac25160bf1d5e9715252 (diff)
downloadchef-exist.tar.gz
File.exists? -> File.exist?exist
Update some of these methods Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'spec/unit/knife/core')
-rw-r--r--spec/unit/knife/core/hashed_command_loader_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/knife/core/hashed_command_loader_spec.rb b/spec/unit/knife/core/hashed_command_loader_spec.rb
index 1958576886..c88656945b 100644
--- a/spec/unit/knife/core/hashed_command_loader_spec.rb
+++ b/spec/unit/knife/core/hashed_command_loader_spec.rb
@@ -50,7 +50,7 @@ describe Chef::Knife::SubcommandLoader::HashedCommandLoader do
describe "#list_commands" do
before do
- allow(File).to receive(:exists?).and_return(true)
+ allow(File).to receive(:exist?).and_return(true)
end
it "lists all commands by category when no argument is given" do
@@ -63,7 +63,7 @@ describe Chef::Knife::SubcommandLoader::HashedCommandLoader do
context "when the plugin path is invalid" do
before do
- expect(File).to receive(:exists?).with("/file/for/plugin/b").and_return(false)
+ expect(File).to receive(:exist?).with("/file/for/plugin/b").and_return(false)
end
it "lists all commands by category when no argument is given" do
@@ -90,7 +90,7 @@ describe Chef::Knife::SubcommandLoader::HashedCommandLoader do
end
it "loads the correct file and returns true if the command exists" do
- allow(File).to receive(:exists?).and_return(true)
+ allow(File).to receive(:exist?).and_return(true)
expect(Kernel).to receive(:load).with("/file/for/plugin/a").and_return(true)
expect(loader.load_command(["cool_a"])).to eq(true)
end