test/vagrant/commands/provision_test.rb in vagrantup-0.4.0 vs test/vagrant/commands/provision_test.rb in vagrantup-0.4.1

- old
+ new

@@ -16,10 +16,11 @@ context "provisioning a single VM" do setup do @foo_vm = mock("vm") @foo_vm.stubs(:env).returns(@env) + @foo_vm.stubs(:created?).returns(true) @vm_for_real = mock("vm for real") @foo_vm.stubs(:vm).returns(@vm_for_real) vms = { :foo => @foo_vm } @env.stubs(:vms).returns(vms) @@ -40,9 +41,18 @@ should "do log to info if it's not running" do logger = mock("logger") logger.expects(:info) @env.stubs(:logger).returns(logger) @vm_for_real.stubs(:running?).returns(false) + @foo_vm.expects(:provision).never + @instance.execute(["foo"]) + end + + should "do log to info if it's not created" do + logger = mock("logger") + logger.expects(:info) + @env.stubs(:logger).returns(logger) + @foo_vm.stubs(:created?).returns(false) @foo_vm.expects(:provision).never @instance.execute(["foo"]) end end