diff options
Diffstat (limited to 'spec/support/gitlab_experiment.rb')
-rw-r--r-- | spec/support/gitlab_experiment.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/support/gitlab_experiment.rb b/spec/support/gitlab_experiment.rb index 3d099dc689c..823aab0436e 100644 --- a/spec/support/gitlab_experiment.rb +++ b/spec/support/gitlab_experiment.rb @@ -10,6 +10,16 @@ RSpec.configure do |config| # Disable all caching for experiments in tests. config.before do allow(Gitlab::Experiment::Configuration).to receive(:cache).and_return(nil) + + # Disable all deprecation warnings in the test environment, which can be + # resolved one by one and tracked in: + # + # https://gitlab.com/gitlab-org/gitlab/-/issues/350944 + allow(Gitlab::Experiment::Configuration).to receive(:deprecator).and_wrap_original do |method, version| + method.call(version).tap do |deprecator| + deprecator.silenced = true + end + end end config.before(:each, :experiment) do |