diff --git a/test/acceptance/package_test.rb b/test/acceptance/package_test.rb new file mode 100644 index 000000000..3ba005b74 --- /dev/null +++ b/test/acceptance/package_test.rb @@ -0,0 +1,23 @@ +require File.expand_path("../base", __FILE__) +require "acceptance/support/shared/command_examples" + +describe "vagrant package" do + include_context "acceptance" + it_behaves_like "a command that requires a Vagrantfile", ["vagrant", "package"] + + # This creates an initial environment that is ready for a "vagrant up" + def initialize_valid_environment + require_box("default") + + assert_execute("vagrant", "box", "add", "base", box_path("default")) + assert_execute("vagrant", "init") + end + + it "can package a running virtual machine" do + initialize_valid_environment + + assert_execute("vagrant", "up") + assert_execute("vagrant", "package") + environment.workdir.join("package.box").should be_file + end +end