summaryrefslogtreecommitdiffstats
path: root/spec/unit/util/autoload.rb
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2009-12-18 16:15:37 -0800
committerJames Turnbull <james@lovedthanlost.net>2009-12-20 08:49:38 +1100
commit8c8e9210a2b538a1848d309ef9f3966d94a95de9 (patch)
treece3b8c1f464e1d1a42609ee0a7202cafbcaf32bf /spec/unit/util/autoload.rb
parentea90daaf95493e3f49fb949b233932b7bf96aae1 (diff)
downloadpuppet-8c8e9210a2b538a1848d309ef9f3966d94a95de9.tar.gz
puppet-8c8e9210a2b538a1848d309ef9f3966d94a95de9.tar.xz
puppet-8c8e9210a2b538a1848d309ef9f3966d94a95de9.zip
Fixing #2963 spec/unit/util/autoload.rb depends on global state
An Autoload spec was depending on files having not yet been autoloaded. Detected as part of #2879. Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
Diffstat (limited to 'spec/unit/util/autoload.rb')
-rwxr-xr-xspec/unit/util/autoload.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/unit/util/autoload.rb b/spec/unit/util/autoload.rb
index 18938125d..4e1384246 100755
--- a/spec/unit/util/autoload.rb
+++ b/spec/unit/util/autoload.rb
@@ -111,6 +111,8 @@ describe Puppet::Util::Autoload do
before do
@autoload.stubs(:searchpath).returns %w{/a}
Dir.stubs(:glob).returns "/path/to/file.rb"
+
+ @autoload.class.stubs(:loaded?).returns(false)
end
[RuntimeError, LoadError, SyntaxError].each do |error|