diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-03 21:17:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-03 21:17:34 +0300 |
commit | 0aa20f3dac8e19cc10b62e08a5c84df105a648c2 (patch) | |
tree | 3347e2aa05c399d70f82775fa58ffd4b531ba282 /spec/lib/gitlab/runtime_spec.rb | |
parent | 67daaf4021a180166ad063e3a75ea777e96586a6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/runtime_spec.rb')
-rw-r--r-- | spec/lib/gitlab/runtime_spec.rb | 24 |
1 files changed, 20 insertions, 4 deletions
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 |