Sha256: 09410f00180d23196a786b469cd009471e70905c00f157f468457f1c7fcb9196

Contents?: true

Size: 672 Bytes

Versions: 4

Compression:

Stored size: 672 Bytes

Contents

require "test_helper"

class PackageBoxActionTest < Test::Unit::TestCase
  setup do
    @klass = Vagrant::Action::Box::Package
    @app, @env = mock_action_data
    @env["box"] = Vagrant::Box.new(mock_environment, "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["box"].directory
      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/box/package_test.rb
vagrantup-0.5.3 test/vagrant/action/box/package_test.rb
vagrant-0.5.4 test/vagrant/action/box/package_test.rb
vagrant-0.5.3 test/vagrant/action/box/package_test.rb