summaryrefslogtreecommitdiff
path: root/spec/support/helpers/stub_feature_flags.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/stub_feature_flags.rb')
-rw-r--r--spec/support/helpers/stub_feature_flags.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/support/helpers/stub_feature_flags.rb b/spec/support/helpers/stub_feature_flags.rb
index b96338bf548..c54a871b157 100644
--- a/spec/support/helpers/stub_feature_flags.rb
+++ b/spec/support/helpers/stub_feature_flags.rb
@@ -1,4 +1,7 @@
module StubFeatureFlags
+ # Stub Feature flags with `flag_name: true/false`
+ #
+ # @param [Hash] features where key is feature name and value is boolean whether enabled or not
def stub_feature_flags(features)
features.each do |feature_name, enabled|
allow(Feature).to receive(:enabled?).with(feature_name) { enabled }