Allow a mock object to receive synced_folders in config validation spec.

When using qemu session, the config is checked
if there are 9p synced folders.
We do not care about synced folders when we want to check
if the MAC address is defined correctly.

The result is a failure from the mock object:
`#<Double "vm"> received unexpected message :synced_folders with (no args)`
This commit is contained in:
Jarek Prokop 2023-02-10 16:26:51 +01:00
parent 8fa764fd8a
commit 75da39aba4

View File

@ -773,6 +773,8 @@ describe VagrantPlugins::ProviderLibvirt::Config do
before do
machine.config.instance_variable_get("@keys")[:vm] = vm
allow(vm).to receive(:box).and_return(box)
allow(vm).to receive(:synced_folders).and_return({})
end
it 'is valid with valid mac' do