spec/unit/plugins/linux/lsb_spec.rb in ohai-8.21.0 vs spec/unit/plugins/linux/lsb_spec.rb in ohai-8.22.0
- old
+ new
@@ -33,10 +33,11 @@
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)
end
it "should set lsb[:id]" do
@plugin.run
@@ -59,10 +60,9 @@
end
end
describe "on systems with /usr/bin/lsb_release" do
before(:each) 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(true)
@stdin = double("STDIN", { :close => true })
@pid = 10
@stderr = double("STDERR")