Sha256: 3967ad2eaae5ce533c7a50b858466ac93e46586c62cac1629e05e9231c07baa3

Contents?: true

Size: 647 Bytes

Versions: 4

Compression:

Stored size: 647 Bytes

Contents

require "test_helper"

class PackageVMActionTest < Test::Unit::TestCase
  setup do
    @klass = Vagrant::Action::VM::Package
    @app, @env = mock_action_data
    @env["export.temp_dir"] = "foo"

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

  should "be a subclass of general packaging middleware" do
    assert @instance.is_a?(Vagrant::Action::General::Package)
  end

  should "set the package directory then call parent" do
    @instance.expects(:general_call).once.with() do |env|
      assert env["package.directory"]
      assert_equal env["package.directory"], env["export.temp_dir"]
      true
    end

    @instance.call(@env)
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
vagrantup-0.5.4 test/vagrant/action/vm/package_test.rb
vagrantup-0.5.3 test/vagrant/action/vm/package_test.rb
vagrant-0.5.4 test/vagrant/action/vm/package_test.rb
vagrant-0.5.3 test/vagrant/action/vm/package_test.rb