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/support/helpers/stubbed_feature.rb')
-rw-r--r--spec/support/helpers/stubbed_feature.rb22
1 files changed, 0 insertions, 22 deletions
diff --git a/spec/support/helpers/stubbed_feature.rb b/spec/support/helpers/stubbed_feature.rb
index 67ceb7d9b35..4113a28182b 100644
--- a/spec/support/helpers/stubbed_feature.rb
+++ b/spec/support/helpers/stubbed_feature.rb
@@ -4,14 +4,6 @@
module StubbedFeature
extend ActiveSupport::Concern
- prepended do
- cattr_reader(:persist_used) do
- # persist feature flags in CI
- # nil: indicates that we do not want to persist used feature flags
- Gitlab::Utils.to_boolean(ENV['CI']) ? {} : nil
- end
- end
-
class_methods do
# Turn stubbed feature flags on or off.
def stub=(stub)
@@ -41,8 +33,6 @@ module StubbedFeature
feature_flag = super
return feature_flag unless stub?
- persist_used!(args.first)
-
# If feature flag is not persisted we mark the feature flag as enabled
# We do `m.call` as we want to validate the execution of method arguments
# and a feature flag state if it is not persisted
@@ -52,17 +42,5 @@ module StubbedFeature
feature_flag
end
-
- # This method creates a temporary file in `tmp/feature_flags`
- # if feature flag was touched during execution
- def persist_used!(name)
- return unless persist_used
- return if persist_used[name]
-
- persist_used[name] = true
- FileUtils.touch(
- Rails.root.join('tmp', 'feature_flags', name.to_s + ".used")
- )
- end
end
end