Fix regression introduced with cab1e4e

This commit is contained in:
Mitchell Hashimoto 2011-11-05 15:19:03 -07:00
parent 66761ae3ff
commit f83c1b3c27
2 changed files with 3 additions and 2 deletions

View File

@ -39,6 +39,7 @@ module Vagrant
if classes.length == (i + 1) || klass.match?(@env["box"].uri)
@env.ui.info I18n.t("vagrant.actions.box.download.with", :class => klass.to_s)
@downloader = klass.new(@env)
break
end
end

View File

@ -39,9 +39,9 @@ class DownloadBoxActionTest < Test::Unit::TestCase
assert @instance.instantiate_downloader
end
should "error environment if URI is invalid for any downloaders" do
should "complain that the file doesn't exist if the URI is invalid for any downloaders" do
@env["box"].uri = "foobar"
assert_raises(Vagrant::Errors::BoxDownloadUnknownType) {
assert_raises(Vagrant::Errors::DownloaderFileDoesntExist) {
@instance.instantiate_downloader
}
end