From 2628d93370ee46272c1bc3311d1ddd0910870597 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Tue, 12 Jun 2018 14:13:10 -0700 Subject: [PATCH] Rename method name when checking capability --- plugins/communicators/ssh/communicator.rb | 2 +- test/unit/plugins/communicators/ssh/communicator_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/communicators/ssh/communicator.rb b/plugins/communicators/ssh/communicator.rb index a7e1cb0ad..1ae8b9047 100644 --- a/plugins/communicators/ssh/communicator.rb +++ b/plugins/communicators/ssh/communicator.rb @@ -195,7 +195,7 @@ module VagrantPlugins end # Adjust private key file permissions if host provides capability - if @machine.env.host.has_capability?(:set_ssh_key_permissions) + if @machine.env.host.capability?(:set_ssh_key_permissions) @machine.env.host.capability(:set_ssh_key_permissions, @machine.data_dir.join("private_key")) end diff --git a/test/unit/plugins/communicators/ssh/communicator_test.rb b/test/unit/plugins/communicators/ssh/communicator_test.rb index d9ccb6835..a236c1931 100644 --- a/test/unit/plugins/communicators/ssh/communicator_test.rb +++ b/test/unit/plugins/communicators/ssh/communicator_test.rb @@ -93,7 +93,7 @@ describe VagrantPlugins::CommunicatorSSH::Communicator do end before do - allow(host).to receive(:has_capability?).and_return(false) + allow(host).to receive(:capability?).and_return(false) end describe ".wait_for_ready" do @@ -216,7 +216,7 @@ describe VagrantPlugins::CommunicatorSSH::Communicator do end it "should call the set_ssh_key_permissions host capability" do - expect(host).to receive(:has_capability?).with(:set_ssh_key_permissions).and_return(true) + expect(host).to receive(:capability?).with(:set_ssh_key_permissions).and_return(true) expect(host).to receive(:capability).with(:set_ssh_key_permissions, private_key_file) end