summaryrefslogtreecommitdiffstats
path: root/spec/unit/util/autoload.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/util/autoload.rb')
-rwxr-xr-xspec/unit/util/autoload.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/unit/util/autoload.rb b/spec/unit/util/autoload.rb
index 3bd5b50ad..d05bc15f0 100755
--- a/spec/unit/util/autoload.rb
+++ b/spec/unit/util/autoload.rb
@@ -71,11 +71,17 @@ describe Puppet::Util::Autoload do
end
it "should skip files that it knows are missing" do
- @autoload.expects(:missing_file?).returns true
+ @autoload.expects(:named_file_missing?).with("foo").returns true
@autoload.expects(:eachdir).never
@autoload.load("foo")
end
+
+ it "should register that files are missing if they cannot be found" do
+ @autoload.load("foo")
+
+ @autoload.should be_named_file_missing("foo")
+ end
end
describe "when loading all files" do