summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-01-29 15:11:32 -0800
committerTim Smith <tsmith84@gmail.com>2020-01-29 15:11:32 -0800
commitc6e61abb9728e7834763f5c03bd436108278695a (patch)
tree062ab9c3fac7613fd7c5d373455544b2dd25ae30
parent4a185dfe5447949e5e41502ea5c0dad281d7ccc7 (diff)
downloadohai-c6e61abb9728e7834763f5c03bd436108278695a.tar.gz
Add a test to ensure optional_plugins become symbols
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/unit/config_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/unit/config_spec.rb b/spec/unit/config_spec.rb
index 61a59e5e..b78dc5c4 100644
--- a/spec/unit/config_spec.rb
+++ b/spec/unit/config_spec.rb
@@ -47,6 +47,13 @@ RSpec.describe Ohai::Config do
.to raise_error(Ohai::Exceptions::PluginConfigError, /Expected Symbol/)
end
end
+
+ describe "option :optional_plugins" do
+ it "Converts string values to symbols" do
+ described_class.ohai[:optional_plugins] = [ "Foo" ]
+ expect(described_class.ohai[:optional_plugins]).to eq([:Foo])
+ end
+ end
end
describe "Ohai.config" do