Use registry merging for provider configs
This commit is contained in:
parent
45879132a3
commit
f3b340aae0
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue