From c176a04cfa6e5eeb5d417ac91322e7e4ef8252d6 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sun, 14 Feb 2010 22:59:01 -0800 Subject: [PATCH] Fixed a bug with forwarded ports action --- lib/vagrant/actions/forward_ports.rb | 4 ++-- test/vagrant/actions/forward_ports_test.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/vagrant/actions/forward_ports.rb b/lib/vagrant/actions/forward_ports.rb index 29b59f45b..767dac06d 100644 --- a/lib/vagrant/actions/forward_ports.rb +++ b/lib/vagrant/actions/forward_ports.rb @@ -10,10 +10,10 @@ module Vagrant port.name = name port.hostport = options[:hostport] port.guestport = options[:guestport] - @vm.forwarded_ports << port + @vm.vm.forwarded_ports << port end - @vm.save(true) + @vm.vm.save(true) end end end diff --git a/test/vagrant/actions/forward_ports_test.rb b/test/vagrant/actions/forward_ports_test.rb index 7cbc55d1c..8239fa6ce 100644 --- a/test/vagrant/actions/forward_ports_test.rb +++ b/test/vagrant/actions/forward_ports_test.rb @@ -18,8 +18,8 @@ class ForwardPortsActionTest < Test::Unit::TestCase end end - @mock_vm.expects(:forwarded_ports).returns(forwarded_ports) - @mock_vm.expects(:save).with(true).once + @vm.expects(:forwarded_ports).returns(forwarded_ports) + @vm.expects(:save).with(true).once @action.execute! end end