spec/unit/action/destroy_domain_spec.rb in vagrant-libvirt-0.1.2 vs spec/unit/action/destroy_domain_spec.rb in vagrant-libvirt-0.2.1

- old
+ new

@@ -31,11 +31,11 @@ let(:root_disk) { double('libvirt_root_disk') } before do allow(libvirt_domain).to receive(:list_snapshots).and_return([]) allow(libvirt_domain).to receive(:has_managed_save?).and_return(nil) - root_disk.stub(name: 'test.img') + allow(root_disk).to receive(:name).and_return('test.img') end context 'when only has root disk' do it 'calls fog to destroy volumes' do expect(domain).to receive(:destroy).with(destroy_volumes: true) @@ -55,10 +55,10 @@ EOF end let(:extra_disk) { double('libvirt_extra_disk') } before do - extra_disk.stub(name: 'test-vdb.qcow2') + allow(extra_disk).to receive(:name).and_return('test-vdb.qcow2') end it 'destroys disks individually' do allow(libvirt_domain).to receive(:name).and_return('test') allow(domain).to receive(:volumes).and_return([extra_disk], [root_disk])