From 4e8062625cf06e851cddf52af3c511e4d6c80466 Mon Sep 17 00:00:00 2001 From: ajpaul Date: Fri, 16 Mar 2018 13:49:39 -0400 Subject: [PATCH] update unit test for change_host_name to fix failures introduced by changes to the module --- test/unit/plugins/guests/windows/cap/change_host_name_test.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/unit/plugins/guests/windows/cap/change_host_name_test.rb b/test/unit/plugins/guests/windows/cap/change_host_name_test.rb index 1f842815b..7a1d7775d 100644 --- a/test/unit/plugins/guests/windows/cap/change_host_name_test.rb +++ b/test/unit/plugins/guests/windows/cap/change_host_name_test.rb @@ -34,6 +34,9 @@ describe "VagrantPlugins::GuestWindows::Cap::ChangeHostName" do 'if (!([System.Net.Dns]::GetHostName() -eq \'newhostname\')) { exit 0 } exit 1', exit_code: 0) communicator.stub_command(rename_script, exit_code: 0) + allow(machine).to receive(:guest) + allow(machine.guest).to receive(:capability) + allow(machine.guest).to receive(:capability?) described_class.change_host_name_and_wait(machine, 'newhostname') end