Sha256: 2ebf157375baf6d1b26f1a18f496f377c665a0d7bbdf2247d47035d26be2ae15

Contents?: true

Size: 576 Bytes

Versions: 81

Compression:

Stored size: 576 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).once
      @env["vm"].expects(:vm=).with(nil).once
      @app.expects(:call).with(@env).once
      @instance.call(@env)
    end
  end
end

Version data entries

81 entries across 81 versions & 9 rubygems

Version Path
bmhatfield-vagrant-1.0.10 test/unit_legacy/vagrant/action/vm/destroy_test.rb
bmhatfield-vagrant-1.0.9 test/unit_legacy/vagrant/action/vm/destroy_test.rb
bmhatfield-vagrant-1.0.8 test/unit_legacy/vagrant/action/vm/destroy_test.rb
bmhatfield-vagrant-1.0.7 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-1.0.7 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-1.0.6 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-1.0.5 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-1.0.4 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-1.0.3 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-1.0.2 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-1.0.1 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-1.0.0 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-0.9.99.2 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-0.9.99.1 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-0.9.7 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-0.9.6 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-0.9.5 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-0.9.4 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-0.9.3 test/unit_legacy/vagrant/action/vm/destroy_test.rb
vagrantup-0.9.2 test/unit_legacy/vagrant/action/vm/destroy_test.rb