summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Higgins <pete@peterhiggins.org>2020-04-15 17:00:52 -0700
committerPete Higgins <pete@peterhiggins.org>2020-04-15 17:02:36 -0700
commitc7569550e5b1bfc0053195c881e98f0facf656d1 (patch)
tree083e122a79f13735cef207157a4c964d4eef3a7a
parentf85082c33b8ccf79385dc7dea4f7ca2d55aa4623 (diff)
downloadohai-expand-windows-dmi.tar.gz
Add some comments explaining test setup.expand-windows-dmi
Signed-off-by: Pete Higgins <pete@peterhiggins.org>
-rw-r--r--spec/unit/plugins/windows/dmi_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/plugins/windows/dmi_spec.rb b/spec/unit/plugins/windows/dmi_spec.rb
index 451850d9..f9f1c16d 100644
--- a/spec/unit/plugins/windows/dmi_spec.rb
+++ b/spec/unit/plugins/windows/dmi_spec.rb
@@ -101,6 +101,10 @@ describe Ohai::System, "DMI", :windows_only do
end
context "with extra information that should be filtered out" do
+ # Each test case has 3 elements:
+ # * The name of the property as it comes from the Windows APIs
+ # * The transformed snake-case version of the property name
+ # * A unique dummy value per test case
FILTERED_KEYS = [
%w{Caption caption aaa},
%w{CreationClassName creation_class_name bbb},
@@ -133,6 +137,11 @@ describe Ohai::System, "DMI", :windows_only do
end
context "with information that should be made to match other platforms" do
+ # Each test case has 4 elements:
+ # * The name of the property as it comes from the Windows APIs
+ # * The transformed snake-case version of the property name
+ # * The Unix equivalent of the property name
+ # * A unique dummy value per test case
RENAMED_KEYS = [
%w{Vendor vendor manufacturer aaa},
%w{IdentifyingNumber identifying_number serial_number bbb},