Sha256: cba5fe76dc9ba1c0b0f5dc97d3db5016515266f719337b6226192996eb4e7c3a
Contents?: true
Size: 779 Bytes
Versions: 4
Compression:
Stored size: 779 Bytes
Contents
require "test_helper" class CustomizeVMActionTest < Test::Unit::TestCase setup do @klass = Vagrant::Action::VM::Customize @app, @env = mock_action_data @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 @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
4 entries across 4 versions & 2 rubygems