Remove Environment#require_box since it is no longer used

This commit is contained in:
Mitchell Hashimoto 2010-07-23 22:37:38 -07:00
parent f472dbde44
commit 555b5af2a8
2 changed files with 0 additions and 52 deletions

View File

@ -353,18 +353,6 @@ module Vagrant
error_and_exit(:rootfile_not_found) if !root_path
end
def require_box
require_root_path
if !box
if !config.vm.box
error_and_exit(:box_not_specified)
else
error_and_exit(:box_specified_doesnt_exist, :box_name => config.vm.box)
end
end
end
def require_persisted_vm
require_root_path

View File

@ -649,46 +649,6 @@ class EnvironmentTest < Test::Unit::TestCase
@env = mock_environment
end
context "requiring boxes" do
setup do
reconfig_environment
end
def reconfig_environment
@env = mock_environment do |config|
yield config if block_given?
end
@env.stubs(:require_root_path)
@env.stubs(:error_and_exit)
end
should "require root path" do
@env.expects(:require_root_path).once
@env.require_box
end
should "error and exit if no box is specified" do
reconfig_environment do |config|
config.vm.box = nil
end
@env.expects(:box).returns(nil)
@env.expects(:error_and_exit).once.with(:box_not_specified)
@env.require_box
end
should "error and exit if box is specified but doesn't exist" do
reconfig_environment do |config|
config.vm.box = "foo"
end
@env.expects(:box).returns(nil)
@env.expects(:error_and_exit).once.with(:box_specified_doesnt_exist, :box_name => "foo")
@env.require_box
end
end
context "requiring root_path" do
should "error and exit if no root_path is set" do
@env.expects(:root_path).returns(nil)