From 604b978cab87c3a4758237229715966d151857ce Mon Sep 17 00:00:00 2001 From: Brian Donovan Date: Tue, 13 Jul 2010 08:46:49 -0700 Subject: [PATCH] Fix an incorrect mock/implementation pair. --- lib/vagrant/action/box/download.rb | 2 +- test/vagrant/action/box/download_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/action/box/download.rb b/lib/vagrant/action/box/download.rb index c1abe50a2..e132cec10 100644 --- a/lib/vagrant/action/box/download.rb +++ b/lib/vagrant/action/box/download.rb @@ -34,7 +34,7 @@ module Vagrant @env["download.classes"].each do |klass| if klass.match?(@env["box"].uri) @env.logger.info "Downloading with #{klass}..." - @downloader = klass.new(@env["box"].uri) + @downloader = klass.new(@env) end end diff --git a/test/vagrant/action/box/download_test.rb b/test/vagrant/action/box/download_test.rb index cd283fa9b..552e98b16 100644 --- a/test/vagrant/action/box/download_test.rb +++ b/test/vagrant/action/box/download_test.rb @@ -50,7 +50,7 @@ class DownloadBoxActionTest < Test::Unit::TestCase context "instantiating downloader" do should "instantiate the proper class" do instance = mock("instance") - Vagrant::Downloaders::HTTP.expects(:new).with(@env["box"].uri).returns(instance) + Vagrant::Downloaders::HTTP.expects(:new).with(@env).returns(instance) instance.expects(:prepare).with(@env["box"].uri).once assert @instance.instantiate_downloader end