Sha256: eaf72c2b027535311be94da611ad01b2cc5744741aee3e5b76c55040a9630e35

Contents?: true

Size: 609 Bytes

Versions: 20

Compression:

Stored size: 609 Bytes

Contents

require "test_helper"

class DestroyVMActionTest < Test::Unit::TestCase
  setup do
    @klass = Vagrant::Action::VM::Destroy
    @app, @env = action_env

    @vm = mock("vm")
    @env["vm"] = @vm

    @internal_vm = mock("internal")
    @vm.stubs(:vm).returns(@internal_vm)

    @instance = @klass.new(@app, @env)
  end

  context "destroying the VM" do
    should "destroy VM and attached images" do
      @internal_vm.expects(:destroy).with(:destroy_medium => :delete).once
      @env["vm"].expects(:vm=).with(nil).once
      @app.expects(:call).with(@env).once
      @instance.call(@env)
    end
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
vagrantup-0.6.9 test/vagrant/action/vm/destroy_test.rb
vagrantup-0.6.8 test/vagrant/action/vm/destroy_test.rb
vagrantup-0.6.7 test/vagrant/action/vm/destroy_test.rb
vagrantup-0.6.6 test/vagrant/action/vm/destroy_test.rb
vagrantup-0.6.5 test/vagrant/action/vm/destroy_test.rb
vagrantup-0.6.4 test/vagrant/action/vm/destroy_test.rb
vagrantup-0.6.3 test/vagrant/action/vm/destroy_test.rb
vagrantup-0.6.2 test/vagrant/action/vm/destroy_test.rb
vagrantup-0.6.1 test/vagrant/action/vm/destroy_test.rb
vagrantup-0.6.0 test/vagrant/action/vm/destroy_test.rb
vagrant-0.6.9 test/vagrant/action/vm/destroy_test.rb
vagrant-0.6.8 test/vagrant/action/vm/destroy_test.rb
vagrant-0.6.7 test/vagrant/action/vm/destroy_test.rb
vagrant-0.6.6 test/vagrant/action/vm/destroy_test.rb
vagrant-0.6.5 test/vagrant/action/vm/destroy_test.rb
vagrant-0.6.4 test/vagrant/action/vm/destroy_test.rb
vagrant-0.6.3 test/vagrant/action/vm/destroy_test.rb
vagrant-0.6.2 test/vagrant/action/vm/destroy_test.rb
vagrant-0.6.1 test/vagrant/action/vm/destroy_test.rb
vagrant-0.6.0 test/vagrant/action/vm/destroy_test.rb