Added test scenario for missing VBoxManage on usability check of VirtualBox provider

This commit is contained in:
Hristo Paskalev 2020-10-14 11:42:57 +03:00
parent 865ffb9965
commit 02485b6f70

View File

@ -63,6 +63,14 @@ describe VagrantPlugins::ProviderVirtualBox::Provider do
expect { subject.usable?(true) }.
to raise_error(Vagrant::Errors::VirtualBoxInstallIncomplete)
end
it "raises an exception if VBoxManage is not found" do
allow(VagrantPlugins::ProviderVirtualBox::Driver::Meta).to receive(:new).
and_raise(Vagrant::Errors::VBoxManageNotFoundError)
expect { subject.usable?(true) }.
to raise_error(Vagrant::Errors::VBoxManageNotFoundError)
end
end
describe "#driver" do