From e4488c415e8cd36fe91df829a6dce3b1084f813f Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 24 Dec 2010 15:19:31 -0800 Subject: [PATCH] Update destroy to use new API for VB4 --- CHANGELOG.md | 6 ++++-- lib/vagrant/action/vm/destroy.rb | 2 +- test/vagrant/action/vm/destroy_test.rb | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index adff27fa6..7a59cf368 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/lib/vagrant/action/vm/destroy.rb b/lib/vagrant/action/vm/destroy.rb index eb9bba409..9d3be98df 100644 --- a/lib/vagrant/action/vm/destroy.rb +++ b/lib/vagrant/action/vm/destroy.rb @@ -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) diff --git a/test/vagrant/action/vm/destroy_test.rb b/test/vagrant/action/vm/destroy_test.rb index 9b4a382bf..da9efbc41 100644 --- a/test/vagrant/action/vm/destroy_test.rb +++ b/test/vagrant/action/vm/destroy_test.rb @@ -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)