From bb1ff247cb8549bebadcd36df82b2a062ee4ec40 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Wed, 28 Oct 2020 21:37:47 -0700 Subject: Remove some duplicate plugin.run calls Signed-off-by: Tim Smith --- spec/unit/plugins/solaris2/platform_spec.rb | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/spec/unit/plugins/solaris2/platform_spec.rb b/spec/unit/plugins/solaris2/platform_spec.rb index 0a1aba99..08bbec74 100644 --- a/spec/unit/plugins/solaris2/platform_spec.rb +++ b/spec/unit/plugins/solaris2/platform_spec.rb @@ -46,20 +46,18 @@ describe Ohai::System, "Solaris plugin platform" do @release = StringIO.new(" SmartOS 20120130T201844Z x86_64\n") allow(File).to receive(:open).with("/etc/release").and_yield(@release) + @plugin.run end it "runs uname and set platform and build" do - @plugin.run expect(@plugin[:platform_build]).to eq("joyent_20120130T201844Z") end it "sets the platform" do - @plugin.run expect(@plugin[:platform]).to eq("smartos") end it "sets the platform_version" do - @plugin.run expect(@plugin[:platform_version]).to eq("5.11") end @@ -86,20 +84,18 @@ describe Ohai::System, "Solaris plugin platform" do @release = StringIO.new(" Oracle Solaris 11.1 X86\n") allow(File).to receive(:open).with("/etc/release").and_yield(@release) + @plugin.run end it "runs uname and set platform and build" do - @plugin.run expect(@plugin[:platform_build]).to eq("11.1") end it "sets the platform" do - @plugin.run expect(@plugin[:platform]).to eq("solaris2") end it "sets the platform_version" do - @plugin.run expect(@plugin[:platform_version]).to eq("5.11") end @@ -126,20 +122,18 @@ describe Ohai::System, "Solaris plugin platform" do @release = StringIO.new(" OmniOS v11 r151026\n Copyright 2017 OmniTI Computer Consulting, Inc. All rights reserved.\n Copyright 2018 OmniOS Community Edition (OmniOSce) Association.\n All rights reserved. Use is subject to licence terms.") allow(File).to receive(:open).with("/etc/release").and_yield(@release) + @plugin.run end it "runs uname and set platform and build" do - @plugin.run expect(@plugin[:platform_build]).to eq("omnios-r151026-673c59f55d") end it "sets the platform" do - @plugin.run expect(@plugin[:platform]).to eq("omnios") end it "sets the platform_version" do - @plugin.run expect(@plugin[:platform_version]).to eq("151026") end -- cgit v1.2.1