spec/beaker/hypervisor/vagrant_spec.rb in beaker-3.19.0 vs spec/beaker/hypervisor/vagrant_spec.rb in beaker-3.20.0
- old
+ new
@@ -418,9 +418,16 @@
vagrant.make_vfile( @hosts )
expect( vagrant ).to receive( :vagrant_cmd ).with( "destroy --force" ).once
vagrant.provision
end
+ it "notifies user of failed provision" do
+ vagrant.provision
+ expect( vagrant ).to receive( :vagrant_cmd ).with( "destroy --force" ).and_raise( RuntimeError )
+ expect( options['logger'] ).to receive( :debug ).with( /Vagrantfile/ )
+ expect{ vagrant.provision }.to raise_error( RuntimeError )
+ end
+
it "can cleanup" do
expect( vagrant ).to receive( :vagrant_cmd ).with( "destroy --force" ).once
expect( FileUtils ).to receive( :rm_rf ).once
vagrant.provision