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:
Diffstat (limited to 'spec/initializers/validate_puma_spec.rb')
-rw-r--r--spec/initializers/validate_puma_spec.rb16
1 files changed, 4 insertions, 12 deletions
diff --git a/spec/initializers/validate_puma_spec.rb b/spec/initializers/validate_puma_spec.rb
index 9ff0ef2c319..c46effd6525 100644
--- a/spec/initializers/validate_puma_spec.rb
+++ b/spec/initializers/validate_puma_spec.rb
@@ -3,8 +3,6 @@
require 'spec_helper'
RSpec.describe 'validate puma' do
- include RakeHelpers
-
subject do
load Rails.root.join('config/initializers/validate_puma.rb')
end
@@ -36,8 +34,6 @@ RSpec.describe 'validate puma' do
context 'for other environments' do
before do
allow(Gitlab).to receive(:com?).and_return(false)
-
- allow(main_object).to receive(:warn)
end
context 'when worker count is 0' do
@@ -46,21 +42,17 @@ RSpec.describe 'validate puma' do
specify { expect { subject }.not_to raise_error }
it 'warns about running Puma in a Single mode' do
- expect(main_object).to receive(:warn) do |warning|
- expect(warning).to include('https://gitlab.com/groups/gitlab-org/-/epics/5303')
- end
-
- subject
+ expect { subject }
+ .to output(%r{https://gitlab.com/groups/gitlab-org/-/epics/5303})
+ .to_stderr
end
end
context 'when worker count is > 0' do
let(:workers) { 2 }
- specify { expect { subject }.not_to raise_error }
-
it 'does not issue a warning' do
- expect(main_object).not_to receive(:warn)
+ expect { subject }.not_to output.to_stderr
end
end
end