2020-12-16 09:10:26 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-02-01 12:09:03 +00:00
|
|
|
# Require the provided spec helper and matchers.
|
|
|
|
require 'gitlab/experiment/rspec'
|
|
|
|
|
2021-01-28 15:09:06 +00:00
|
|
|
# This is a temporary fix until we have a larger discussion around the
|
|
|
|
# challenges raised in https://gitlab.com/gitlab-org/gitlab/-/issues/300104
|
|
|
|
class ApplicationExperiment < Gitlab::Experiment # rubocop:disable Gitlab/NamespacedClass
|
2021-02-09 00:09:37 +00:00
|
|
|
def initialize(...)
|
|
|
|
super(...)
|
2021-02-03 15:09:24 +00:00
|
|
|
Feature.persist_used!(feature_flag_name)
|
2021-01-28 15:09:06 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-12-16 09:10:26 +00:00
|
|
|
# Disable all caching for experiments in tests.
|
|
|
|
Gitlab::Experiment::Configuration.cache = nil
|