spec/unit/plugins/linux/lsb_spec.rb in ohai-13.12.6 vs spec/unit/plugins/linux/lsb_spec.rb in ohai-14.0.28

- old
+ new

@@ -33,12 +33,12 @@ and_yield("DISTRIB_ID=Ubuntu"). and_yield("DISTRIB_RELEASE=8.04"). and_yield("DISTRIB_CODENAME=hardy"). and_yield('DISTRIB_DESCRIPTION="Ubuntu 8.04"') allow(File).to receive(:open).with("/etc/lsb-release").and_return(@double_file) - allow(File).to receive(:exists?).with("/usr/bin/lsb_release").and_return(false) - allow(File).to receive(:exists?).with("/etc/lsb-release").and_return(true) + allow(File).to receive(:exist?).with("/usr/bin/lsb_release").and_return(false) + allow(File).to receive(:exist?).with("/etc/lsb-release").and_return(true) end it "should set lsb[:id]" do @plugin.run expect(@plugin[:lsb][:id]).to eq("Ubuntu") @@ -60,11 +60,11 @@ end end describe "on systems with /usr/bin/lsb_release" do before(:each) do - allow(File).to receive(:exists?).with("/usr/bin/lsb_release").and_return(true) + allow(File).to receive(:exist?).with("/usr/bin/lsb_release").and_return(true) @stdin = double("STDIN", { :close => true }) @pid = 10 @stderr = double("STDERR") @stdout = double("STDOUT") @@ -138,10 +138,10 @@ end end end it "should not set any lsb values if /etc/lsb-release or /usr/bin/lsb_release do not exist " do - allow(File).to receive(:exists?).with("/etc/lsb-release").and_return(false) - allow(File).to receive(:exists?).with("/usr/bin/lsb_release").and_return(false) + allow(File).to receive(:exist?).with("/etc/lsb-release").and_return(false) + allow(File).to receive(:exist?).with("/usr/bin/lsb_release").and_return(false) expect(@plugin.attribute?(:lsb)).to be(false) end end