spec/unit/plugins/init_package_spec.rb in ohai-15.2.5 vs spec/unit/plugins/init_package_spec.rb in ohai-15.3.1
- old
+ new
@@ -28,32 +28,32 @@
let(:proc1_content) { "init\n" }
let(:proc1_exists) { true }
let(:proc_1_file_path) { "/proc/1/comm" }
let(:proc_1_file) { double(proc_1_file_path, gets: proc1_content) }
- before(:each) do
+ before do
allow(File).to receive(:exist?).with(proc_1_file_path).and_return(proc1_exists)
allow(File).to receive(:open).with(proc_1_file_path).and_return(proc_1_file)
end
- it "should set init_package to init" do
+ it "sets init_package to init" do
plugin.run
expect(plugin[:init_package]).to eq("init")
end
describe "when init_package is systemd" do
let(:proc1_content) { "systemd\n" }
- it "should set init_package to systemd" do
+ it "sets init_package to systemd" do
plugin.run
expect(plugin[:init_package]).to eq("systemd")
end
end
describe "when /proc/1/comm doesn't exist" do
let(:proc1_exists) { false }
- it "should set init_package to init" do
+ it "sets init_package to init" do
plugin.run
expect(plugin[:init_package]).to eq("init")
end
end
end