`nics` on virtualbox are now called `network_adapters`

This commit is contained in:
Mitchell Hashimoto 2010-04-08 01:21:22 -07:00
parent 068c0e67c5
commit d44dd9a4eb
2 changed files with 5 additions and 5 deletions

View File

@ -31,8 +31,8 @@ module Vagrant
def setup_mac_address def setup_mac_address
logger.info "Matching MAC addresses..." logger.info "Matching MAC addresses..."
@runner.vm.nics.first.macaddress = @runner.env.config.vm.base_mac @runner.vm.network_adapters.first.mac_address = @runner.env.config.vm.base_mac
@runner.vm.save(true) @runner.vm.save
end end
end end
end end

View File

@ -96,10 +96,10 @@ class UpActionTest < Test::Unit::TestCase
context "setting up MAC address" do context "setting up MAC address" do
should "match the mac address with the base" do should "match the mac address with the base" do
nic = mock("nic") nic = mock("nic")
nic.expects(:macaddress=).once nic.expects(:mac_address=).once
@vm.expects(:nics).returns([nic]).once @vm.expects(:network_adapters).returns([nic]).once
@vm.expects(:save).with(true).once @vm.expects(:save).once
@action.setup_mac_address @action.setup_mac_address
end end