spec/unit/plugins/linux/platform_spec.rb in ohai-8.26.1 vs spec/unit/plugins/linux/platform_spec.rb in ohai-13.0.0
- old
+ new
@@ -1,8 +1,8 @@
#
# Author:: Adam Jacob (<adam@chef.io>)
-# Copyright:: Copyright (c) 2008-2016 Chef Software, Inc.
+# Copyright:: Copyright (c) 2008-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -14,11 +14,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
-require File.expand_path(File.dirname(__FILE__) + "/../../../spec_helper.rb")
+require_relative "../../../spec_helper.rb"
describe Ohai::System, "Linux plugin platform" do
let(:have_debian_version) { false }
let(:have_redhat_release) { false }
@@ -111,11 +111,11 @@
it "should set platform to amazon and platform_family to rhel when [:lsb][:id] contains Amazon" do
@plugin[:lsb][:id] = "AmazonAMI"
@plugin[:lsb][:release] = "2011.09"
@plugin.run
expect(@plugin[:platform]).to eq("amazon")
- expect(@plugin[:platform_family]).to eq("rhel")
+ expect(@plugin[:platform_family]).to eq("amazon")
end
it "should set platform to scientific when [:lsb][:id] contains ScientificSL" do
@plugin[:lsb][:id] = "ScientificSL"
@plugin[:lsb][:release] = "5.7"
@@ -356,10 +356,10 @@
end
it "should set the platform_family to rhel if the LSB name is amazon-ish" do
@plugin[:lsb][:id] = "Amazon"
@plugin.run
- expect(@plugin[:platform_family]).to eq("rhel")
+ expect(@plugin[:platform_family]).to eq("amazon")
end
it "should set the platform_family to fedora if the LSB name is fedora-ish" do
@plugin[:lsb][:id] = "Fedora"
@plugin.run