Fix packaging. Broke due to internal changes from multivm. [closes GH-64]
This commit is contained in:
parent
4d077a1ca2
commit
5251d89241
|
@ -20,13 +20,12 @@ module Vagrant
|
|||
def package_base
|
||||
# Packaging a base box; that is a VM not tied to a specific
|
||||
# vagrant environment
|
||||
vm = VM.find(options[:base])
|
||||
vm = VM.find(options[:base], env)
|
||||
if !vm
|
||||
error_and_exit(:vm_base_not_found, :name => options[:base])
|
||||
return # for tests
|
||||
end
|
||||
|
||||
vm.env = env
|
||||
package_vm(vm)
|
||||
end
|
||||
|
||||
|
|
|
@ -27,15 +27,14 @@ class CommandsPackageTest < Test::Unit::TestCase
|
|||
|
||||
context "packaging base" do
|
||||
should "error and exit if no VM is found" do
|
||||
Vagrant::VM.expects(:find).with("foo").returns(nil)
|
||||
Vagrant::VM.expects(:find).with("foo", @instance.env).returns(nil)
|
||||
@instance.expects(:error_and_exit).with(:vm_base_not_found, :name => "foo").once
|
||||
@instance.execute(["--base", "foo"])
|
||||
end
|
||||
|
||||
should "package the VM like any other VM" do
|
||||
vm = mock("vm")
|
||||
Vagrant::VM.expects(:find).with("foo").returns(vm)
|
||||
vm.expects(:env=).with(@env).once
|
||||
Vagrant::VM.expects(:find).with("foo", @instance.env).returns(vm)
|
||||
@instance.expects(:package_vm).with(vm).once
|
||||
@instance.execute(["--base", "foo"])
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|||
|
||||
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
||||
s.authors = ["Mitchell Hashimoto", "John Bender"]
|
||||
s.date = %q{2010-05-17}
|
||||
s.date = %q{2010-05-18}
|
||||
s.default_executable = %q{vagrant}
|
||||
s.description = %q{Vagrant is a tool for building and distributing virtualized development environments.}
|
||||
s.email = ["mitchell.hashimoto@gmail.com", "john.m.bender@gmail.com"]
|
||||
|
|
Loading…
Reference in New Issue