Sha256: cafa30e59e7aee98c5b958462d40b8950c59c1bc517e0d36e0c8a0dfccc0b85d
Contents?: true
Size: 715 Bytes
Versions: 4
Compression:
Stored size: 715 Bytes
Contents
require "test_helper" class DestroyBoxActionTest < Test::Unit::TestCase setup do @klass = Vagrant::Action::Box::Destroy @app, @env = mock_action_data @vm = mock("vm") @env["vm"] = @vm @env["box"] = Vagrant::Box.new(mock_environment, "foo") @internal_vm = mock("internal") @vm.stubs(:vm).returns(@internal_vm) @instance = @klass.new(@app, @env) end context "calling" do setup do @env.logger.stubs(:info) end should "delete the box directory" do seq = sequence("seq") FileUtils.expects(:rm_rf).with(@env["box"].directory).in_sequence(seq) @app.expects(:call).with(@env).once.in_sequence(seq) @instance.call(@env) end end end
Version data entries
4 entries across 4 versions & 2 rubygems