Fixed error with doing a `vagrant up` when no Vagrantfile was present

This commit is contained in:
Mitchell Hashimoto 2010-07-30 18:01:12 -07:00
parent c446ea1d95
commit fea5ed67c5
5 changed files with 11 additions and 2 deletions

View File

@ -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]

View File

@ -10,6 +10,7 @@ module Vagrant
description "Reload the vagrant environment"
def execute(args=[])
env.require_root_path
all_or_single(args, :reload)
end

View File

@ -9,6 +9,7 @@ module Vagrant
description "Creates the vagrant environment"
def execute(args=[])
env.require_root_path
all_or_single(args, :up)
end

View File

@ -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

View File

@ -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