spec/unit/config_spec.rb in ohai-14.2.0 vs spec/unit/config_spec.rb in ohai-14.3.0
- old
+ new
@@ -28,24 +28,24 @@
expect(Ohai::Config.ohai[:plugin]).to have_key(:foo)
expect(Ohai::Config.ohai[:plugin][:foo]).to be true
end
it "gets configured with a Hash" do
- value = { :bar => true, :baz => true }
+ value = { bar: true, baz: true }
Ohai::Config.ohai[:plugin][:foo] = value
expect(Ohai::Config.ohai[:plugin]).to have_key(:foo)
expect(Ohai::Config.ohai[:plugin][:foo]).to eq(value)
end
it "raises an error if the plugin name is not a symbol" do
- expect { Ohai::Config.ohai[:plugin]["foo"] = false }.
- to raise_error(Ohai::Exceptions::PluginConfigError, /Expected Symbol/)
+ expect { Ohai::Config.ohai[:plugin]["foo"] = false }
+ .to raise_error(Ohai::Exceptions::PluginConfigError, /Expected Symbol/)
end
it "raises an error if the value Hash has non-Symbol key" do
value = { :bar => true, "baz" => true }
- expect { Ohai::Config.ohai[:plugin][:foo] = value }.
- to raise_error(Ohai::Exceptions::PluginConfigError, /Expected Symbol/)
+ expect { Ohai::Config.ohai[:plugin][:foo] = value }
+ .to raise_error(Ohai::Exceptions::PluginConfigError, /Expected Symbol/)
end
end
end
describe "Ohai.config" do