From e80552b6aa6c1be7482f7b10dc2a2e4cab6e1fef Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 21 Jan 2014 20:10:32 -0800 Subject: [PATCH] core: if synced folder type is blank, use default --- lib/vagrant/action/builtin/mixin_synced_folders.rb | 2 +- .../vagrant/action/builtin/mixin_synced_folders_test.rb | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/action/builtin/mixin_synced_folders.rb b/lib/vagrant/action/builtin/mixin_synced_folders.rb index 7ffa64d03..5bdc287a8 100644 --- a/lib/vagrant/action/builtin/mixin_synced_folders.rb +++ b/lib/vagrant/action/builtin/mixin_synced_folders.rb @@ -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] diff --git a/test/unit/vagrant/action/builtin/mixin_synced_folders_test.rb b/test/unit/vagrant/action/builtin/mixin_synced_folders_test.rb index 6d96990f7..d24063109 100644 --- a/test/unit/vagrant/action/builtin/mixin_synced_folders_test.rb +++ b/test/unit/vagrant/action/builtin/mixin_synced_folders_test.rb @@ -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