Tests passing from recent action changes

This commit is contained in:
Mitchell Hashimoto 2011-07-07 23:58:42 -07:00
parent 911a44523c
commit 2492f479d5
4 changed files with 8 additions and 7 deletions

View File

@ -24,6 +24,7 @@ class CustomizeVMActionTest < Test::Unit::TestCase
@env.env.config.vm.customize { |vm| }
@env.env.config.vm.expects(:run_procs!).with(@internal_vm)
@internal_vm.expects(:save).once
@env["vm"].expects(:reload!).once
@app.expects(:call).with(@env).once
@instance.call(@env)
end

View File

@ -143,8 +143,8 @@ class ForwardPortsVMActionTest < Test::Unit::TestCase
network_adapter.expects(:attachment_type).returns(:nat)
@instance.expects(:forward_port).once
@internal_vm.expects(:save).once
@vm.expects(:reload!).once
@env["config"].vm.stubs(:customize).yields(@internal_vm)
@instance.forward_ports
end
@ -154,8 +154,8 @@ class ForwardPortsVMActionTest < Test::Unit::TestCase
@internal_vm.expects(:network_adapters).returns([network_adapter])
network_adapter.expects(:attachment_type).returns(:host_only)
@internal_vm.expects(:save).once
@vm.expects(:reload!).once
@env["config"].vm.stubs(:customize).yields(@internal_vm)
@instance.forward_ports
end
end
@ -188,7 +188,7 @@ class ForwardPortsVMActionTest < Test::Unit::TestCase
adapters[opts[:adapter]] = adapter
@internal_vm.stubs(:network_adapters).returns(adapters)
@instance.forward_port(name, opts)
@instance.forward_port(@internal_vm, name, opts)
end
end
end

View File

@ -20,9 +20,9 @@ class MatchMACAddressVMActionTest < Test::Unit::TestCase
update_seq = sequence("update_seq")
@internal_vm.expects(:network_adapters).returns([nic]).once.in_sequence(update_seq)
@internal_vm.expects(:save).once.in_sequence(update_seq)
@app.expects(:call).with(@env).once.in_sequence(update_seq)
@env["config"].vm.expects(:customize).yields(@internal_vm)
@instance.call(@env)
end

View File

@ -105,8 +105,8 @@ class ShareFoldersVMActionTest < Test::Unit::TestCase
end
@internal_vm.stubs(:shared_folders).returns(shared_folders)
@internal_vm.expects(:save).once
@env["config"].vm.expects(:customize).yields(@internal_vm)
@instance.create_metadata
end
end