Update destroy to use new API for VB4

This commit is contained in:
Mitchell Hashimoto 2010-12-24 15:19:31 -08:00
parent 083c820a1b
commit e4488c415e
3 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,8 @@
## 0.6.10 (unreleased)
## 0.7.0 (unreleased)
- VirtualBox 4.0 support. Support for VirtualBox 3.2 is _dropped_, since
the API is so different. Stay with the 0.6.x series if you have VirtualBox
3.2.x.
## 0.6.9 (December 21, 2010)

View File

@ -8,7 +8,7 @@ module Vagrant
def call(env)
env.ui.info I18n.t("vagrant.actions.vm.destroy.destroying")
env["vm"].vm.destroy(:destroy_medium => :delete)
env["vm"].vm.destroy
env["vm"].vm = nil
@app.call(env)

View File

@ -16,7 +16,7 @@ class DestroyVMActionTest < Test::Unit::TestCase
context "destroying the VM" do
should "destroy VM and attached images" do
@internal_vm.expects(:destroy).with(:destroy_medium => :delete).once
@internal_vm.expects(:destroy).once
@env["vm"].expects(:vm=).with(nil).once
@app.expects(:call).with(@env).once
@instance.call(@env)