Get tests passing again, use V2 config in tests.

This commit is contained in:
Mitchell Hashimoto 2012-11-07 20:06:55 -08:00
parent 53860f90ab
commit f52f8ecc97
2 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
Vagrant.configure("1") do |config| Vagrant.configure("2") do |config|
# default config goes here # default config goes here
config.vagrant.dotfile_name = ".vagrant" config.vagrant.dotfile_name = ".vagrant"
config.vagrant.host = :detect config.vagrant.host = :detect

View File

@ -12,7 +12,7 @@ describe Vagrant::Environment do
isolated_environment.tap do |e| isolated_environment.tap do |e|
e.box2("base", :virtualbox) e.box2("base", :virtualbox)
e.vagrantfile <<-VF e.vagrantfile <<-VF
Vagrant.configure("1") do |config| Vagrant.configure("2") do |config|
config.vm.box = "base" config.vm.box = "base"
end end
VF VF
@ -111,7 +111,7 @@ describe Vagrant::Environment do
it "should be the VM marked as the primary" do it "should be the VM marked as the primary" do
environment = isolated_environment do |env| environment = isolated_environment do |env|
env.vagrantfile(<<-VF) env.vagrantfile(<<-VF)
Vagrant::Config.run do |config| Vagrant.configure("2") do |config|
config.vm.box = "base" config.vm.box = "base"
config.vm.define :foo config.vm.define :foo
config.vm.define :bar, :primary => true config.vm.define :bar, :primary => true
@ -128,7 +128,7 @@ VF
it "should load global configuration" do it "should load global configuration" do
environment = isolated_environment do |env| environment = isolated_environment do |env|
env.vagrantfile(<<-VF) env.vagrantfile(<<-VF)
Vagrant::Config.run do |config| Vagrant.configure("2") do |config|
config.vagrant.dotfile_name = "foo" config.vagrant.dotfile_name = "foo"
end end
VF VF
@ -141,7 +141,7 @@ VF
it "should load from a custom Vagrantfile" do it "should load from a custom Vagrantfile" do
environment = isolated_environment do |env| environment = isolated_environment do |env|
env.file("non_standard_name", <<-VF) env.file("non_standard_name", <<-VF)
Vagrant::Config.run do |config| Vagrant.configure("2") do |config|
config.vagrant.dotfile_name = "custom" config.vagrant.dotfile_name = "custom"
end end
VF VF
@ -154,7 +154,7 @@ VF
it "should load VM configuration" do it "should load VM configuration" do
environment = isolated_environment do |env| environment = isolated_environment do |env|
env.vagrantfile(<<-VF) env.vagrantfile(<<-VF)
Vagrant::Config.run do |config| Vagrant.configure("2") do |config|
config.vagrant.dotfile_name = "foo" config.vagrant.dotfile_name = "foo"
end end
VF VF
@ -167,7 +167,7 @@ VF
it "should load VM configuration with multiple VMs" do it "should load VM configuration with multiple VMs" do
environment = isolated_environment do |env| environment = isolated_environment do |env|
env.vagrantfile(<<-VF) env.vagrantfile(<<-VF)
Vagrant::Config.run do |config| Vagrant.configure("2") do |config|
config.vm.define :foo do |vm| config.vm.define :foo do |vm|
vm.ssh.port = 100 vm.ssh.port = 100
end end
@ -187,13 +187,13 @@ VF
it "should load a V1 vagrant box" do it "should load a V1 vagrant box" do
environment = isolated_environment do |env| environment = isolated_environment do |env|
env.vagrantfile(<<-VF) env.vagrantfile(<<-VF)
Vagrant::Config.run do |config| Vagrant.configure("2") do |config|
config.vm.box = "base" config.vm.box = "base"
end end
VF VF
env.box("base", <<-VF) env.box("base", <<-VF)
Vagrant::Config.run do |config| Vagrant.configure("2") do |config|
config.ssh.port = 100 config.ssh.port = 100
end end
VF VF
@ -206,13 +206,13 @@ VF
it "should load box configuration" do it "should load box configuration" do
environment = isolated_environment do |env| environment = isolated_environment do |env|
env.vagrantfile(<<-VF) env.vagrantfile(<<-VF)
Vagrant::Config.run do |config| Vagrant.configure("2") do |config|
config.vm.box = "base" config.vm.box = "base"
end end
VF VF
env.box2("base", :virtualbox, :vagrantfile => <<-VF) env.box2("base", :virtualbox, :vagrantfile => <<-VF)
Vagrant::Config.run do |config| Vagrant.configure("2") do |config|
config.ssh.port = 100 config.ssh.port = 100
end end
VF VF