diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index b96d6338e..afa075fd4 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -9,7 +9,7 @@ module Vagrant # access to the VMs, CLI, etc. all in the scope of this environment. class Environment HOME_SUBDIRS = ["tmp", "boxes", "logs"] - DEFAULT_VM = "default" + DEFAULT_VM = :default DEFAULT_HOME = "~/.vagrant.d" # Parent environment (in the case of multi-VMs) @@ -452,7 +452,7 @@ module Vagrant # Second pass, with the box config = inner_load[subvm, boxes.find(config.vm.box)] - config.vm.name = vm_name.to_s + config.vm.name = vm_name # Return the final configuration for this VM config @@ -487,7 +487,7 @@ module Vagrant vm = VirtualBox::VM.find(uuid) result[name.to_sym] = Vagrant::VM.new(name.to_sym, self, - config.for_vm(name.to_s), + config.for_vm(name.to_sym), vm) end diff --git a/test/unit/vagrant/environment_test.rb b/test/unit/vagrant/environment_test.rb index 8a4049232..748c56f95 100644 --- a/test/unit/vagrant/environment_test.rb +++ b/test/unit/vagrant/environment_test.rb @@ -62,7 +62,7 @@ VF end env = environment.create_vagrant_env - env.config.for_vm("default").vm.name.should == "default" + env.config.for_vm(:default).vm.name.should == :default end it "should load VM configuration with multiple VMs" do @@ -81,8 +81,8 @@ VF end env = environment.create_vagrant_env - env.config.for_vm("foo").ssh.port.should == 100 - env.config.for_vm("bar").ssh.port.should == 200 + env.config.for_vm(:foo).ssh.port.should == 100 + env.config.for_vm(:bar).ssh.port.should == 200 end it "should load box configuration" do @@ -101,7 +101,7 @@ VF end env = environment.create_vagrant_env - env.config.for_vm("default").ssh.port.should == 100 + env.config.for_vm(:default).ssh.port.should == 100 end end