diff options
author | Pete Higgins <pete@peterhiggins.org> | 2020-04-15 13:01:07 -0700 |
---|---|---|
committer | Pete Higgins <pete@peterhiggins.org> | 2020-04-15 16:51:50 -0700 |
commit | f6a02a4a29a3666c7eb26937847c48945bb183cd (patch) | |
tree | c45938552f0ba7df198a0ad2b77038b3e7e369e6 | |
parent | aeb0375128ffade95aedfe3ae09f8d4d03b39eb8 (diff) | |
download | ohai-f6a02a4a29a3666c7eb26937847c48945bb183cd.tar.gz |
Fix chefstyle violations.
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r-- | spec/unit/plugins/windows/dmi_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/plugins/windows/dmi_spec.rb b/spec/unit/plugins/windows/dmi_spec.rb index b6e1412b..1be6b184 100644 --- a/spec/unit/plugins/windows/dmi_spec.rb +++ b/spec/unit/plugins/windows/dmi_spec.rb @@ -46,7 +46,7 @@ describe Ohai::System, "DMI", :windows_only do ].freeze before do - properties = CASES.map {|name, _, _| double(name: name) } + properties = CASES.map { |name, _, _| double(name: name) } wmi_ole_object = double properties_: properties CASES.each do |name, _, value| @@ -77,22 +77,22 @@ describe Ohai::System, "DMI", :windows_only do double(name: "SharedProperty"), ] - wmi_ole_objects = %w[tacos nachos].map do |value| + wmi_ole_objects = %w{tacos nachos}.map do |value| object = double properties_: properties allow(object).to receive(:invoke).with("UniqueProperty").and_return(value) allow(object).to receive(:invoke).with("SharedProperty").and_return("Taco Bell") object end - wmi_objects = wmi_ole_objects.map {|o| WmiLite::Wmi::Instance.new(o) } + wmi_objects = wmi_ole_objects.map { |o| WmiLite::Wmi::Instance.new(o) } expect_any_instance_of(WmiLite::Wmi).to receive(:instances_of).with("Win32_SystemEnclosure").and_return(wmi_objects) plugin.run end it "adds unique values to :all_records" do - values = plugin[:dmi][:chassis][:all_records].map {|r| r["UniqueProperty"] } - expect(values).to eq(%w[tacos nachos]) + values = plugin[:dmi][:chassis][:all_records].map { |r| r["UniqueProperty"] } + expect(values).to eq(%w{tacos nachos}) end it "adds shared values to the root with snake case key" do |