Forwarding ports action
This commit is contained in:
parent
9e6478c0d6
commit
ae6f086fad
|
@ -10,10 +10,10 @@ module Vagrant
|
|||
port.name = name
|
||||
port.hostport = options[:hostport]
|
||||
port.guestport = options[:guestport]
|
||||
@vm.vm.forwarded_ports << port
|
||||
@vm.forwarded_ports << port
|
||||
end
|
||||
|
||||
@vm.vm.save(true)
|
||||
@vm.save(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,8 +18,8 @@ class ForwardPortsActionTest < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
@vm.expects(:forwarded_ports).returns(forwarded_ports)
|
||||
@vm.expects(:save).with(true).once
|
||||
@mock_vm.expects(:forwarded_ports).returns(forwarded_ports)
|
||||
@mock_vm.expects(:save).with(true).once
|
||||
@action.execute!
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue