From faeb8a944096046ef4038b9c7561291b25a0f199 Mon Sep 17 00:00:00 2001 From: Gilles Cornu Date: Fri, 10 Jul 2015 13:37:33 +0200 Subject: [PATCH] core: plugin management requires bundler With this change, the `Vagrant::plugins_enabled?` is now false when the embedded Bundler is not available. Resolve the broken RSpec unit tests after 479323f1e849b7a8cc570c703566a607a4c6353c. --- lib/vagrant/shared_helpers.rb | 4 ++-- test/unit/support/shared/base_context.rb | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/shared_helpers.rb b/lib/vagrant/shared_helpers.rb index 12545ae4f..fe114013e 100644 --- a/lib/vagrant/shared_helpers.rb +++ b/lib/vagrant/shared_helpers.rb @@ -38,11 +38,11 @@ module Vagrant ENV["VAGRANT_INSTALLER_EMBEDDED_DIR"] end - # This returns whether or not 3rd party plugins should be loaded. + # This returns whether or not 3rd party plugins should and can be loaded. # # @return [Boolean] def self.plugins_enabled? - !ENV["VAGRANT_NO_PLUGINS"] + !ENV["VAGRANT_NO_PLUGINS"] && $vagrant_bundler_runtime end # Whether or not super quiet mode is enabled. This is ill-advised. diff --git a/test/unit/support/shared/base_context.rb b/test/unit/support/shared/base_context.rb index 0f823948d..bd7f3f517 100644 --- a/test/unit/support/shared/base_context.rb +++ b/test/unit/support/shared/base_context.rb @@ -12,6 +12,9 @@ shared_context "unit" do # Create a thing to store our temporary files so that they aren't # unlinked right away. @_temp_files = [] + + # Roughly simulate the embedded Bundler availability + $vagrant_bundler_runtime = Object.new end after(:each) do