core: if synced folder type is blank, use default

This commit is contained in:
Mitchell Hashimoto 2014-01-21 20:10:32 -08:00
parent d81af187ea
commit e80552b6aa
2 changed files with 6 additions and 2 deletions

View File

@ -65,7 +65,7 @@ module Vagrant
next if data[:disabled]
impl = ""
impl = data[:type].to_sym if data[:type]
impl = data[:type].to_sym if data[:type] && !data[:type].empty?
if impl != ""
impl_class = plugins[impl]

View File

@ -74,11 +74,15 @@ describe Vagrant::Action::Builtin::MixinSyncedFolders do
it "should return the proper set of folders" do
folders["root"] = {}
folders["another"] = { type: "" }
folders["nfs"] = { type: "nfs" }
result = subject.synced_folders(machine)
result.length.should == 2
result[:default].should == { "root" => folders["root"] }
result[:default].should == {
"another" => folders["another"],
"root" => folders["root"],
}
result[:nfs].should == { "nfs" => folders["nfs"] }
end