spec/unit/plugins/dmi_spec.rb in ohai-8.2.0 vs spec/unit/plugins/dmi_spec.rb in ohai-8.3.0.rc.0
- old
+ new
@@ -121,8 +121,14 @@
data.each do |attribute, value|
it "should have [:dmi][:#{id}][:#{attribute}] set" do
@plugin.run
expect(@plugin[:dmi][id][attribute]).to eql(value)
end
+ it "should have [:dmi][:#{id}][:#{attribute}] set for windows output" do
+ @stdout = convert_windows_output(DMI_OUT)
+ expect(@plugin).to receive(:shell_out).with("dmidecode").and_return(mock_shell_out(0, @stdout, ""))
+ @plugin.run
+ expect(@plugin[:dmi][id][attribute]).to eql(value)
+ end
end
end
end