diff --git a/spec/support/helpers/stub_feature_flags.rb b/spec/support/helpers/stub_feature_flags.rb index 31ae9570ec7..e301e29afc2 100644 --- a/spec/support/helpers/stub_feature_flags.rb +++ b/spec/support/helpers/stub_feature_flags.rb @@ -37,7 +37,9 @@ module StubFeatureFlags # Enable `ci_live_trace` feature flag only on the specified projects. def stub_feature_flags(features) features.each do |feature_name, actors| - warn "Invalid Feature Flag #{feature_name} stubbed" unless Feature::Definition.get(feature_name) + unless Feature::Definition.get(feature_name) + ActiveSupport::Deprecation.warn "Invalid Feature Flag #{feature_name} stubbed" + end # Remove feature flag overwrite feature = Feature.get(feature_name) # rubocop:disable Gitlab/AvoidFeatureGet