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!
run_procs!(config)
config.loaded!
config
end
end
end

View File

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