Provision registered actions
This commit is contained in:
parent
68f1e6c7e1
commit
d313a106a3
|
@ -5,6 +5,13 @@ module Vagrant
|
|||
# all the necessary Vagrant libraries are loaded. Hopefully
|
||||
# in the future this will no longer be necessary with autoloading.
|
||||
def self.builtin!
|
||||
# provision - Provisions a running VM
|
||||
provision = Builder.new do
|
||||
use VM::Provision
|
||||
end
|
||||
|
||||
register :provision, provision
|
||||
|
||||
# start - Starts a VM, assuming it already exists on the
|
||||
# environment.
|
||||
start = Builder.new do
|
||||
|
|
|
@ -118,7 +118,7 @@ module Vagrant
|
|||
end
|
||||
|
||||
def provision
|
||||
execute!(Actions::VM::Provision)
|
||||
env.actions.run(:provision)
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
|
|
@ -184,7 +184,7 @@ class VMTest < Test::Unit::TestCase
|
|||
|
||||
context "provisioning" do
|
||||
should "execute the provision action" do
|
||||
@vm.expects(:execute!).with(Vagrant::Actions::VM::Provision).once
|
||||
@vm.env.actions.expects(:run).with(:provision).once
|
||||
@vm.provision
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue