summaryrefslogtreecommitdiff
path: root/spec/unit/loader_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/loader_spec.rb')
-rw-r--r--spec/unit/loader_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/loader_spec.rb b/spec/unit/loader_spec.rb
index f211a7b1..bfe2aa83 100644
--- a/spec/unit/loader_spec.rb
+++ b/spec/unit/loader_spec.rb
@@ -219,6 +219,14 @@ EOF
expect { loader.load_plugin(path_to("bad_name.rb")) }.not_to raise_error
end
end
+
+ describe "when plugin directory does not exist" do
+ it "logs an invalid plugin path warning" do
+ expect(Ohai::Log).to receive(:warn).with(/The plugin path.*does not exist/)
+ allow(Dir).to receive(:exist?).with("/bogus/dir").and_return(false)
+ Ohai::Loader::PluginFile.find_all_in("/bogus/dir")
+ end
+ end
end
end
end