mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Use instance doubles for driver where possible (#1491)
Switch to instance doubles for driver where possible and reduce usage of allow_any_instance_of. Additionally replace some incorrect allows with expects to validate calls are not made.
This commit is contained in:
@@ -26,9 +26,6 @@ describe VagrantPlugins::ProviderLibvirt::Action::CreateDomainVolume do
|
||||
|
||||
describe '#call' do
|
||||
before do
|
||||
allow_any_instance_of(VagrantPlugins::ProviderLibvirt::Driver)
|
||||
.to receive(:connection).and_return(connection)
|
||||
allow(connection).to receive(:client).and_return(libvirt_client)
|
||||
allow(connection).to receive(:volumes).and_return(volumes)
|
||||
allow(volumes).to receive(:all).and_return(all)
|
||||
allow(all).to receive(:first).and_return(box_volume)
|
||||
|
||||
Reference in New Issue
Block a user