From a7b3560714b4d9cc4ab32dffcd1f74a284b93580 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 18 Feb 2022 09:45:46 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-8-stable-ee --- spec/lib/gitlab/runtime_spec.rb | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) (limited to 'spec/lib/gitlab/runtime_spec.rb') diff --git a/spec/lib/gitlab/runtime_spec.rb b/spec/lib/gitlab/runtime_spec.rb index 4627a8db82e..402b72b9220 100644 --- a/spec/lib/gitlab/runtime_spec.rb +++ b/spec/lib/gitlab/runtime_spec.rb @@ -26,8 +26,16 @@ RSpec.describe Gitlab::Runtime do end context "when unknown" do - it "raises an exception when trying to identify" do - expect { subject.identify }.to raise_error(subject::UnknownProcessError) + describe '.identify' do + it "raises an exception when trying to identify" do + expect { subject.identify }.to raise_error(subject::UnknownProcessError) + end + end + + describe '.safe_identify' do + it "returns nil" do + expect(subject.safe_identify).to be_nil + end end end @@ -37,8 +45,16 @@ RSpec.describe Gitlab::Runtime do stub_const('::Rails::Console', double) end - it "raises an exception when trying to identify" do - expect { subject.identify }.to raise_error(subject::AmbiguousProcessError) + describe '.identify' do + it "raises an exception when trying to identify" do + expect { subject.identify }.to raise_error(subject::AmbiguousProcessError) + end + end + + describe '.safe_identify' do + it "returns nil" do + expect(subject.safe_identify).to be_nil + end end end -- cgit v1.2.3