Share folders go into the modify pipeline
This commit is contained in:
parent
d797e48389
commit
0b02deb37a
|
@ -33,7 +33,7 @@ module Vagrant
|
|||
end
|
||||
|
||||
def create_metadata
|
||||
@env["config"].vm.customize do |vm|
|
||||
proc = lambda do |vm|
|
||||
@env.ui.info I18n.t("vagrant.actions.vm.share_folders.creating")
|
||||
|
||||
shared_folders.each do |name, data|
|
||||
|
@ -43,6 +43,8 @@ module Vagrant
|
|||
vm.shared_folders << folder
|
||||
end
|
||||
end
|
||||
|
||||
@env["vm.modify"].call(proc)
|
||||
end
|
||||
|
||||
def mount_shared_folders
|
||||
|
|
|
@ -10,6 +10,7 @@ class ShareFoldersVMActionTest < Test::Unit::TestCase
|
|||
@vm.stubs(:ssh).returns(mock("ssh"))
|
||||
@vm.stubs(:system).returns(mock("system"))
|
||||
@env["vm"] = @vm
|
||||
@env["vm.modify"] = mock("proc")
|
||||
|
||||
@internal_vm = mock("internal")
|
||||
@vm.stubs(:vm).returns(@internal_vm)
|
||||
|
@ -106,7 +107,11 @@ class ShareFoldersVMActionTest < Test::Unit::TestCase
|
|||
|
||||
@internal_vm.stubs(:shared_folders).returns(shared_folders)
|
||||
|
||||
@env["config"].vm.expects(:customize).yields(@internal_vm)
|
||||
@env["vm.modify"].expects(:call).with() do |proc|
|
||||
proc.call(@internal_vm)
|
||||
true
|
||||
end
|
||||
|
||||
@instance.create_metadata
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue