Boot verifies not erroneous environment before booting

This commit is contained in:
Mitchell Hashimoto 2010-07-18 08:24:47 -07:00
parent 1e29532255
commit 769431ce7c
2 changed files with 11 additions and 0 deletions

View File

@ -8,6 +8,9 @@ module Vagrant
end
def call(env)
# Do nothing if the environment is erroneous
return if env.error?
@env = env
# Start up the VM and wait for it to boot.

View File

@ -16,6 +16,14 @@ class BootVMActionTest < Test::Unit::TestCase
end
context "calling" do
should "do nothing if environment is erroneous" do
@env.error!(:foo)
@instance.expects(:boot).never
@app.expects(:call).never
@instance.call(@env)
end
should "run the proper methods on success" do
boot_seq = sequence("boot_seq")
@instance.expects(:boot).in_sequence(boot_seq)