Fix broken unit tests

This commit is contained in:
Mitchell Hashimoto 2014-10-22 09:44:48 -07:00
parent 57a1269e35
commit 7988f0fb7c
3 changed files with 11 additions and 4 deletions

View File

@ -112,10 +112,12 @@ module Vagrant
raise "Internal error. Report this as a bug. Invalid: #{data[:type]}"
end
if !impl_class[0].new.usable?(machine, true)
# Verify that explicitly defined shared folder types are
# actually usable.
raise Errors::SyncedFolderUnusable, type: data[:type].to_s
if !opts[:disable_usable_check]
if !impl_class[0].new.usable?(machine, true)
# Verify that explicitly defined shared folder types are
# actually usable.
raise Errors::SyncedFolderUnusable, type: data[:type].to_s
end
end
end

View File

@ -20,6 +20,7 @@ module VagrantPlugins
opts = {
cached: !!env[:synced_folders_cached],
config: env[:synced_folders_config],
disable_usable_check: !!env[:test],
}
folders = synced_folders(env[:machine], **opts)

View File

@ -25,6 +25,10 @@ describe VagrantPlugins::ProviderVirtualBox::Action::PrepareNFSSettings do
subject { described_class.new(app, env) }
before do
env[:test] = true
end
it "calls the next action in the chain" do
called = false
app = lambda { |*args| called = true }