summaryrefslogtreecommitdiff
path: root/spec/unit/plugins/darwin/platform_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/plugins/darwin/platform_spec.rb')
-rw-r--r--spec/unit/plugins/darwin/platform_spec.rb26
1 files changed, 4 insertions, 22 deletions
diff --git a/spec/unit/plugins/darwin/platform_spec.rb b/spec/unit/plugins/darwin/platform_spec.rb
index ecd2c5f0..578b61c2 100644
--- a/spec/unit/plugins/darwin/platform_spec.rb
+++ b/spec/unit/plugins/darwin/platform_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Adam Jacob (<adam@chef.io>)
-# Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
+# Copyright:: Copyright (c) Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,7 +22,7 @@ describe Ohai::System, "Darwin plugin platform" do
before do
@plugin = get_plugin("darwin/platform")
allow(@plugin).to receive(:collect_os).and_return(:darwin)
- @stdout = "ProductName: Mac OS X\nProductVersion: 10.5.5\nBuildVersion: 9F33"
+ @stdout = "ProductName: Mac OS X\nProductVersion: 10.15.6\nBuildVersion: 19G46c"
allow(@plugin).to receive(:shell_out).with("/usr/bin/sw_vers").and_return(mock_shell_out(0, @stdout, ""))
end
@@ -38,34 +38,16 @@ describe Ohai::System, "Darwin plugin platform" do
it "sets platform_version to ProductVersion" do
@plugin.run
- expect(@plugin[:platform_version]).to eq("10.5.5")
+ expect(@plugin[:platform_version]).to eq("10.15.6")
end
it "sets platform_build to BuildVersion" do
@plugin.run
- expect(@plugin[:platform_build]).to eq("9F33")
+ expect(@plugin[:platform_build]).to eq("19G46c")
end
it "sets platform_family to mac_os_x" do
@plugin.run
expect(@plugin[:platform_family]).to eq("mac_os_x")
end
-
- describe "on os x server" do
- before do
- @plugin[:os] = "darwin"
- @stdout = "ProductName: Mac OS X Server\nProductVersion: 10.6.8\nBuildVersion: 10K549"
- allow(@plugin).to receive(:shell_out).with("/usr/bin/sw_vers").and_return(mock_shell_out(0, @stdout, ""))
- end
-
- it "sets platform to mac_os_x_server" do
- @plugin.run
- expect(@plugin[:platform]).to eq("mac_os_x_server")
- end
-
- it "sets platform_family to mac_os_x" do
- @plugin.run
- expect(@plugin[:platform_family]).to eq("mac_os_x")
- end
- end
end