Forwarded ports action reloads the model after clearing

This commit is contained in:
Mitchell Hashimoto 2010-05-30 18:09:36 -07:00
parent 6fc2f4661a
commit b63c74fad9
2 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,7 @@ module Vagrant
def clear
logger.info "Deleting any previously set forwarded ports..."
@runner.vm.forwarded_ports.collect { |p| p.destroy }
@runner.reload!
end
def forward_ports

View File

@ -165,6 +165,7 @@ class ForwardPortsActionTest < Test::Unit::TestCase
end
@vm.expects(:forwarded_ports).returns(forwarded_ports)
@runner.expects(:reload!)
@action.clear
end
end