From f83c1b3c27c79cf473aae0c3a420d8c0fa1bbe3e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 5 Nov 2011 15:19:03 -0700 Subject: [PATCH] Fix regression introduced with cab1e4e --- lib/vagrant/action/box/download.rb | 1 + test/unit/vagrant/action/box/download_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/vagrant/action/box/download.rb b/lib/vagrant/action/box/download.rb index a8f46c8ad..31f5b686f 100644 --- a/lib/vagrant/action/box/download.rb +++ b/lib/vagrant/action/box/download.rb @@ -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 diff --git a/test/unit/vagrant/action/box/download_test.rb b/test/unit/vagrant/action/box/download_test.rb index ff385dda1..69196cabe 100644 --- a/test/unit/vagrant/action/box/download_test.rb +++ b/test/unit/vagrant/action/box/download_test.rb @@ -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