diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-01-29 15:11:32 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-01-29 15:11:32 -0800 |
commit | c6e61abb9728e7834763f5c03bd436108278695a (patch) | |
tree | 062ab9c3fac7613fd7c5d373455544b2dd25ae30 | |
parent | 4a185dfe5447949e5e41502ea5c0dad281d7ccc7 (diff) | |
download | ohai-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.rb | 7 |
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 |