Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-27 21:08:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-27 21:08:12 +0300
commit41c9fff024a72e6581e71c2ae080bdcb961a5601 (patch)
treeb36a268efbaee403fa424048f030d5e281dcfbf8 /spec/lib/gitlab/runtime_spec.rb
parentfb73ca3398c2ac49a616ab553e117b0586089702 (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.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/lib/gitlab/runtime_spec.rb b/spec/lib/gitlab/runtime_spec.rb
index ff8b383ba45..6059644a1b2 100644
--- a/spec/lib/gitlab/runtime_spec.rb
+++ b/spec/lib/gitlab/runtime_spec.rb
@@ -3,6 +3,10 @@
require 'spec_helper'
describe Gitlab::Runtime do
+ before do
+ allow(described_class).to receive(:process_name).and_return('ruby')
+ end
+
context "when unknown" do
it "raises an exception when trying to identify" do
expect { subject.identify }.to raise_error(subject::UnknownProcessError)
@@ -36,6 +40,8 @@ describe Gitlab::Runtime do
expect(subject.unicorn?).to be(false)
expect(subject.sidekiq?).to be(false)
expect(subject.console?).to be(false)
+ expect(subject.rake?).to be(false)
+ expect(subject.rspec?).to be(false)
end
end
@@ -57,6 +63,8 @@ describe Gitlab::Runtime do
expect(subject.puma?).to be(false)
expect(subject.sidekiq?).to be(false)
expect(subject.console?).to be(false)
+ expect(subject.rake?).to be(false)
+ expect(subject.rspec?).to be(false)
end
end
@@ -77,6 +85,8 @@ describe Gitlab::Runtime do
expect(subject.unicorn?).to be(false)
expect(subject.puma?).to be(false)
expect(subject.console?).to be(false)
+ expect(subject.rake?).to be(false)
+ expect(subject.rspec?).to be(false)
end
end
@@ -96,6 +106,26 @@ describe Gitlab::Runtime do
expect(subject.unicorn?).to be(false)
expect(subject.sidekiq?).to be(false)
expect(subject.puma?).to be(false)
+ expect(subject.rake?).to be(false)
+ expect(subject.rspec?).to be(false)
+ end
+ end
+
+ context "rspec" do
+ before do
+ allow(described_class).to receive(:process_name).and_return('rspec')
+ end
+
+ it "identifies itself" do
+ expect(subject.identify).to eq(:rspec)
+ expect(subject.rspec?).to be(true)
+ end
+
+ it "does not identify as others" do
+ expect(subject.unicorn?).to be(false)
+ expect(subject.sidekiq?).to be(false)
+ expect(subject.rake?).to be(false)
+ expect(subject.puma?).to be(false)
end
end
end