summaryrefslogtreecommitdiff
path: root/spec/unit/plugins/darwin/hardware_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/plugins/darwin/hardware_spec.rb')
-rw-r--r--spec/unit/plugins/darwin/hardware_spec.rb16
1 files changed, 2 insertions, 14 deletions
diff --git a/spec/unit/plugins/darwin/hardware_spec.rb b/spec/unit/plugins/darwin/hardware_spec.rb
index 3f0f6b0d..f8c8e1d5 100644
--- a/spec/unit/plugins/darwin/hardware_spec.rb
+++ b/spec/unit/plugins/darwin/hardware_spec.rb
@@ -31,21 +31,9 @@ describe Ohai::System, "Darwin hardware plugin", :unix_only do
)
allow(plugin).to receive(:shell_out).with(
- "sw_vers -productName"
+ "sw_vers"
).and_return(
- mock_shell_out(0, "Mac OS X", "")
- )
-
- allow(plugin).to receive(:shell_out).with(
- "sw_vers -productVersion"
- ).and_return(
- mock_shell_out(0, "10.12", "")
- )
-
- allow(plugin).to receive(:shell_out).with(
- "sw_vers -buildVersion"
- ).and_return(
- mock_shell_out(0, "16A239j", "")
+ mock_shell_out(0, "ProductName: Mac OS X\nProductVersion: 10.12\nBuildVersion: 16A239j", "")
)
allow(plugin).to receive(:shell_out).with(