diff --git a/CHANGELOG.md b/CHANGELOG.md index 15cbe16da..8a9ae8be4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 0.5.1 (unreleased) + - Fixed error with doing a `vagrant up` when no Vagrantfile existed. [GH-128] - Fixed NFS erroring when NFS wasn't even enabled if `/etc/exports` doesn't exist. [GH-126] - Fixed `vagrant resume` to properly resume a suspended VM. [GH-122] diff --git a/lib/vagrant/commands/reload.rb b/lib/vagrant/commands/reload.rb index e4a4217d1..20f4b1784 100644 --- a/lib/vagrant/commands/reload.rb +++ b/lib/vagrant/commands/reload.rb @@ -10,6 +10,7 @@ module Vagrant description "Reload the vagrant environment" def execute(args=[]) + env.require_root_path all_or_single(args, :reload) end diff --git a/lib/vagrant/commands/up.rb b/lib/vagrant/commands/up.rb index fad688907..6cd62204e 100644 --- a/lib/vagrant/commands/up.rb +++ b/lib/vagrant/commands/up.rb @@ -9,6 +9,7 @@ module Vagrant description "Creates the vagrant environment" def execute(args=[]) + env.require_root_path all_or_single(args, :up) end diff --git a/test/vagrant/commands/reload_test.rb b/test/vagrant/commands/reload_test.rb index 0ab3462af..56e656ecd 100644 --- a/test/vagrant/commands/reload_test.rb +++ b/test/vagrant/commands/reload_test.rb @@ -5,12 +5,15 @@ class CommandsReloadTest < Test::Unit::TestCase @klass = Vagrant::Commands::Reload @env = mock_environment + @env.stubs(:require_root_path) @instance = @klass.new(@env) end context "executing" do should "call all or single for the method" do - @instance.expects(:all_or_single).with([], :reload) + seq = sequence("seq") + @env.expects(:require_root_path).in_sequence(seq) + @instance.expects(:all_or_single).with([], :reload).in_sequence(seq) @instance.execute end end diff --git a/test/vagrant/commands/up_test.rb b/test/vagrant/commands/up_test.rb index dbae1486a..e3e25ed84 100644 --- a/test/vagrant/commands/up_test.rb +++ b/test/vagrant/commands/up_test.rb @@ -5,12 +5,15 @@ class CommandsUpTest < Test::Unit::TestCase @klass = Vagrant::Commands::Up @env = mock_environment + @env.stubs(:require_root_path) @instance = @klass.new(@env) end context "executing" do should "call all or single for the method" do - @instance.expects(:all_or_single).with([], :up) + seq = sequence("seq") + @env.expects(:require_root_path).in_sequence(seq) + @instance.expects(:all_or_single).with([], :up).in_sequence(seq) @instance.execute end end