allow(File).to receive(:file?).and_return(true)
allow(File).to receive(:file?).once.with('/var/run/reboot-required').and_return(true)
end
+
it { is_expected.to eq true }
end
allow(File).to receive(:file?).and_return(true)
allow(File).to receive(:file?).once.with('/var/run/reboot-required').and_return(false)
end
+
it { is_expected.to eq false }
end
end