From a4428cd201e0cd84f5fd6bb848a744cc73552c9d Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 10 Mar 2010 21:58:51 -0800 Subject: [PATCH] Added :chef_server provisioner shortcut --- lib/vagrant/actions/vm/provision.rb | 3 ++- test/vagrant/actions/vm/provision_test.rb | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/vagrant/actions/vm/provision.rb b/lib/vagrant/actions/vm/provision.rb index d2e07c8a1..656da4c18 100644 --- a/lib/vagrant/actions/vm/provision.rb +++ b/lib/vagrant/actions/vm/provision.rb @@ -24,7 +24,8 @@ module Vagrant elsif provisioner.is_a?(Symbol) # We have a few hard coded provisioners for built-ins mapping = { - :chef_solo => Provisioners::ChefSolo + :chef_solo => Provisioners::ChefSolo, + :chef_server => Provisioners::ChefServer } provisioner_klass = mapping[provisioner] diff --git a/test/vagrant/actions/vm/provision_test.rb b/test/vagrant/actions/vm/provision_test.rb index 0cd863b18..cc3448f8a 100644 --- a/test/vagrant/actions/vm/provision_test.rb +++ b/test/vagrant/actions/vm/provision_test.rb @@ -97,6 +97,10 @@ class ProvisionActionTest < Test::Unit::TestCase provisioner_expectation(:chef_solo, Vagrant::Provisioners::ChefSolo) end + should "set :chef_server to the ChefServer provisioner" do + provisioner_expectation(:chef_server, Vagrant::Provisioners::ChefServer) + end + should "call prepare on the instance" do instance = mock("instance") instance.expects(:prepare).once