Boot verifies not erroneous environment before booting
This commit is contained in:
parent
1e29532255
commit
769431ce7c
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue