summaryrefslogtreecommitdiffstats
path: root/spec/unit/util/autoload.rb
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-05-21 15:19:49 -0700
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit7952af5b80331f60d9f3703e63285fc7fb733a8c (patch)
tree74b7a45df019223de872469395cc2ef51574a3c1 /spec/unit/util/autoload.rb
parentf35c59f83b8df2e595ec44a6258dbae30c81237e (diff)
downloadpuppet-7952af5b80331f60d9f3703e63285fc7fb733a8c.tar.gz
puppet-7952af5b80331f60d9f3703e63285fc7fb733a8c.tar.xz
puppet-7952af5b80331f60d9f3703e63285fc7fb733a8c.zip
[#3674] Autoloader should propagate failures
Change Autoloader's loadall to re-raise exceptions that happen when trying to load files, rather than just warning. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
Diffstat (limited to 'spec/unit/util/autoload.rb')
-rwxr-xr-xspec/unit/util/autoload.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/unit/util/autoload.rb b/spec/unit/util/autoload.rb
index 5862073ea..1b8866246 100755
--- a/spec/unit/util/autoload.rb
+++ b/spec/unit/util/autoload.rb
@@ -113,10 +113,10 @@ describe Puppet::Util::Autoload do
end
[RuntimeError, LoadError, SyntaxError].each do |error|
- it "should not die an if a #{error.to_s} exception is thrown" do
+ it "should die an if a #{error.to_s} exception is thrown" do
Kernel.expects(:require).raises error
- lambda { @autoload.loadall }.should_not raise_error
+ lambda { @autoload.loadall }.should raise_error(Puppet::Error)
end
end