Sha256: 69de5dc94fa54d76da3cab3ea2167d69a60cad71a8b3eed9e8bfa3633ded6dae
Contents?: true
Size: 813 Bytes
Versions: 42
Compression:
Stored size: 813 Bytes
Contents
require "test_helper" class CustomizeVMActionTest < Test::Unit::TestCase setup do @klass = Vagrant::Action::VM::Customize @app, @env = action_env @instance = @klass.new(@app, @env) @vm = mock("vm") @env["vm"] = @vm @internal_vm = mock("internal") @vm.stubs(:vm).returns(@internal_vm) end should "not run anything if no customize blocks exist" do @env.env.config.vm.proc_stack.clear @internal_vm.expects(:save).never @app.expects(:call).with(@env).once @instance.call(@env) end should "run the VM customization procs then save the VM" do @env.env.config.vm.customize { |vm| } @env.env.config.vm.expects(:run_procs!).with(@internal_vm) @internal_vm.expects(:save).once @app.expects(:call).with(@env).once @instance.call(@env) end end
Version data entries
42 entries across 42 versions & 4 rubygems