diff options
author | Tim Smith <tsmith@chef.io> | 2018-07-06 23:31:02 -0700 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2018-07-06 23:31:02 -0700 |
commit | 0c3e7c0cd5fa8796b75d1280480f1cc781586148 (patch) | |
tree | 96a26ae7799e298bb52d9c97e0ddd97cc6923d24 | |
parent | 4d257e6d606d393a70d7bffce0747aa2e1f3389d (diff) | |
download | ohai-0c3e7c0cd5fa8796b75d1280480f1cc781586148.tar.gz |
Make sure we test multi-directory parsing
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | spec/unit/system_spec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/unit/system_spec.rb b/spec/unit/system_spec.rb index 7d817e70..c6fe8ac3 100644 --- a/spec/unit/system_spec.rb +++ b/spec/unit/system_spec.rb @@ -38,7 +38,7 @@ describe "Ohai::System" do it "merges provided configuration options into the ohai config context" do config = { disabled_plugins: [ :Foo, :Baz ], - directory: "/some/extra/plugins", + directory: ["/some/extra/plugins"], critical_plugins: [ :Foo, :Bar ], } Ohai::System.new(config) @@ -47,13 +47,14 @@ describe "Ohai::System" do end end - context "when directory is configured" do - let(:directory) { "/some/fantastic/plugins" } + context "when multiple directories are configured" do + let(:directory) { ["/some/fantastic/plugins", "/some/other/plugins"] } it "adds directory to plugin_path" do Ohai.config[:directory] = directory Ohai::System.new({ invoked_from_cli: true }) - expect(Ohai.config[:plugin_path]).to include(directory) + expect(Ohai.config[:plugin_path]).to include("/some/fantastic/plugins") + expect(Ohai.config[:plugin_path]).to include("/some/other/plugins") end end |