diff --git a/test/unit/vagrant/environment_test.rb b/test/unit/vagrant/environment_test.rb index 82cc3e630..aff33d4ef 100644 --- a/test/unit/vagrant/environment_test.rb +++ b/test/unit/vagrant/environment_test.rb @@ -22,6 +22,8 @@ describe Vagrant::Environment do let(:instance) { env.create_vagrant_env } + subject { instance } + describe "active machines" do it "should be empty if the machines folder doesn't exist" do folder = instance.local_data_path.join("machines") @@ -110,6 +112,20 @@ describe Vagrant::Environment do end end + describe "default provider" do + it "is virtualbox without any environmental variable" do + with_temp_env("VAGRANT_DEFAULT_PROVIDER" => nil) do + subject.default_provider.should == :virtualbox + end + end + + it "is whatever the environmental variable is if set" do + with_temp_env("VAGRANT_DEFAULT_PROVIDER" => "foo") do + subject.default_provider.should == :foo + end + end + end + describe "home path" do it "is set to the home path given" do Dir.mktmpdir do |dir|