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/lib/gitlab/profiler_spec.rb')
-rw-r--r--spec/lib/gitlab/profiler_spec.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/lib/gitlab/profiler_spec.rb b/spec/lib/gitlab/profiler_spec.rb
index 48e2a2e9794..5187c96b511 100644
--- a/spec/lib/gitlab/profiler_spec.rb
+++ b/spec/lib/gitlab/profiler_spec.rb
@@ -206,8 +206,12 @@ RSpec.describe Gitlab::Profiler do
end
end
- before do
- stub_const('STDOUT', stdout)
+ around do |example|
+ original_stdout = $stdout
+
+ $stdout = stdout # rubocop: disable RSpec/ExpectOutput
+ example.run
+ $stdout = original_stdout # rubocop: disable RSpec/ExpectOutput
end
it 'prints a profile result sorted by total time' do