Fix an incorrect mock/implementation pair.

This commit is contained in:
Brian Donovan 2010-07-13 08:46:49 -07:00 committed by Mitchell Hashimoto
parent 98f66201e4
commit 604b978cab
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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