Fix an incorrect mock/implementation pair.
This commit is contained in:
parent
98f66201e4
commit
604b978cab
|
@ -34,7 +34,7 @@ module Vagrant
|
||||||
@env["download.classes"].each do |klass|
|
@env["download.classes"].each do |klass|
|
||||||
if klass.match?(@env["box"].uri)
|
if klass.match?(@env["box"].uri)
|
||||||
@env.logger.info "Downloading with #{klass}..."
|
@env.logger.info "Downloading with #{klass}..."
|
||||||
@downloader = klass.new(@env["box"].uri)
|
@downloader = klass.new(@env)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ class DownloadBoxActionTest < Test::Unit::TestCase
|
||||||
context "instantiating downloader" do
|
context "instantiating downloader" do
|
||||||
should "instantiate the proper class" do
|
should "instantiate the proper class" do
|
||||||
instance = mock("instance")
|
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
|
instance.expects(:prepare).with(@env["box"].uri).once
|
||||||
assert @instance.instantiate_downloader
|
assert @instance.instantiate_downloader
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue