`vagrant resume` command now uses new environment
This commit is contained in:
parent
c7508e91b9
commit
0641df7563
|
@ -148,9 +148,9 @@ msg
|
||||||
# This command requires that an instance already be brought up with
|
# This command requires that an instance already be brought up with
|
||||||
# `vagrant up`.
|
# `vagrant up`.
|
||||||
def resume
|
def resume
|
||||||
Env.load!
|
env = Environment.load!
|
||||||
Env.require_persisted_vm
|
env.require_persisted_vm
|
||||||
Env.persisted_vm.resume
|
env.vm.resume
|
||||||
end
|
end
|
||||||
|
|
||||||
# Export and package the current vm
|
# Export and package the current vm
|
||||||
|
|
|
@ -189,8 +189,13 @@ class CommandsTest < Test::Unit::TestCase
|
||||||
@persisted_vm.stubs(:saved?).returns(true)
|
@persisted_vm.stubs(:saved?).returns(true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "load the current environment" do
|
||||||
|
Vagrant::Environment.expects(:load!).once.returns(@env)
|
||||||
|
Vagrant::Commands.resume
|
||||||
|
end
|
||||||
|
|
||||||
should "require a persisted VM" do
|
should "require a persisted VM" do
|
||||||
Vagrant::Env.expects(:require_persisted_vm).once
|
@env.expects(:require_persisted_vm).once
|
||||||
Vagrant::Commands.resume
|
Vagrant::Commands.resume
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue