Config#execute! returns the newly loaded configuration

This commit is contained in:
Mitchell Hashimoto 2010-03-18 12:28:58 -07:00
parent a7652244d5
commit e84b17e215
2 changed files with 7 additions and 0 deletions

View File

@ -29,6 +29,7 @@ module Vagrant
def execute! def execute!
run_procs!(config) run_procs!(config)
config.loaded! config.loaded!
config
end end
end end
end end

View File

@ -78,6 +78,12 @@ class ConfigTest < Test::Unit::TestCase
Vagrant::Config.execute! Vagrant::Config.execute!
assert Vagrant::Config.config.loaded? assert Vagrant::Config.config.loaded?
end end
should "return the configuration on execute!" do
Vagrant::Config.run {}
result = Vagrant::Config.execute!
assert result.equal?(Vagrant.config)
end
end end
context "base class" do context "base class" do