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
479323f1e8.
This commit is contained in:
Gilles Cornu 2015-07-10 13:37:33 +02:00
parent 8f951291be
commit faeb8a9440
2 changed files with 5 additions and 2 deletions

View File

@ -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.

View File

@ -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