Rename method name when checking capability

This commit is contained in:
Chris Roberts 2018-06-12 14:13:10 -07:00
parent 87b8321702
commit 2628d93370
2 changed files with 3 additions and 3 deletions

View File

@ -195,7 +195,7 @@ module VagrantPlugins
end end
# Adjust private key file permissions if host provides capability # 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")) @machine.env.host.capability(:set_ssh_key_permissions, @machine.data_dir.join("private_key"))
end end

View File

@ -93,7 +93,7 @@ describe VagrantPlugins::CommunicatorSSH::Communicator do
end end
before do before do
allow(host).to receive(:has_capability?).and_return(false) allow(host).to receive(:capability?).and_return(false)
end end
describe ".wait_for_ready" do describe ".wait_for_ready" do
@ -216,7 +216,7 @@ describe VagrantPlugins::CommunicatorSSH::Communicator do
end end
it "should call the set_ssh_key_permissions host capability" do 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) expect(host).to receive(:capability).with(:set_ssh_key_permissions, private_key_file)
end end