Add test for WinRMNotReady exceptions for ready? method
This commit is contained in:
parent
796ff7b190
commit
d2b7da065f
|
@ -68,6 +68,11 @@ describe VagrantPlugins::CommunicatorWinRM::Communicator do
|
|||
expect(subject.ready?).to be(false)
|
||||
end
|
||||
|
||||
it "returns false if hostname command fails with a WinRMNotReady error" do
|
||||
expect(shell).to receive(:cmd).with("hostname").and_raise(VagrantPlugins::CommunicatorWinRM::Errors::WinRMNotReady)
|
||||
expect(subject.ready?).to be(false)
|
||||
end
|
||||
|
||||
it "raises an error if hostname command fails with an unknown error" do
|
||||
expect(shell).to receive(:cmd).with("hostname").and_raise(Vagrant::Errors::VagrantError)
|
||||
expect { subject.ready? }.to raise_error(Vagrant::Errors::VagrantError)
|
||||
|
|
Loading…
Reference in New Issue