Use registry merging for provider configs

This commit is contained in:
Mitchell Hashimoto 2013-01-13 13:00:06 -08:00
parent 45879132a3
commit f3b340aae0
2 changed files with 3 additions and 3 deletions

View File

@ -98,10 +98,10 @@ module Vagrant
#
# @return [Hash]
def provider_configs
configs = {}
configs = Registry.new
@registered.each do |plugin|
configs.merge!(plugin.components.configs[:provider].to_hash)
configs.merge!(plugin.components.configs[:provider])
end
configs

View File

@ -109,7 +109,7 @@ describe Vagrant::Plugin::V2::Manager do
instance.register(pA)
instance.register(pB)
instance.provider_configs.length.should == 2
instance.provider_configs.to_hash.length.should == 2
instance.provider_configs[:foo].should == "foo"
instance.provider_configs[:bar].should == "bar"
end