From ea25f49c636857293167befce226d501b337ba89 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 20 Mar 2010 00:50:59 -0700 Subject: [PATCH] Pass environment to box.find --- lib/vagrant/environment.rb | 2 +- test/vagrant/environment_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/vagrant/environment.rb b/lib/vagrant/environment.rb index f82f45203..ca1535408 100644 --- a/lib/vagrant/environment.rb +++ b/lib/vagrant/environment.rb @@ -166,7 +166,7 @@ module Vagrant def load_box! return unless root_path - @box = Box.find(config.vm.box) if config.vm.box + @box = Box.find(self, config.vm.box) if config.vm.box @box.env = self if @box end diff --git a/test/vagrant/environment_test.rb b/test/vagrant/environment_test.rb index a0a581ff6..3738c2ffc 100644 --- a/test/vagrant/environment_test.rb +++ b/test/vagrant/environment_test.rb @@ -341,14 +341,14 @@ class EnvironmentTest < Test::Unit::TestCase end should "set the box to what is found by the Box class" do - Vagrant::Box.expects(:find).with(@env.config.vm.box).once.returns(@box) + Vagrant::Box.expects(:find).with(@env, @env.config.vm.box).once.returns(@box) @env.load_box! assert @box.equal?(@env.box) end should "set the environment of the box" do @box.expects(:env=).with(@env).once - Vagrant::Box.expects(:find).with(@env.config.vm.box).once.returns(@box) + Vagrant::Box.expects(:find).with(@env, @env.config.vm.box).once.returns(@box) @env.load_box! end end