debian-mirror-gitlab/spec/support/stub_feature_flags.rb

9 lines
275 B
Ruby
Raw Normal View History

2017-09-10 17:25:29 +05:30
module StubFeatureFlags
def stub_feature_flags(features)
features.each do |feature_name, enabled|
allow(Feature).to receive(:enabled?).with(feature_name) { enabled }
allow(Feature).to receive(:enabled?).with(feature_name.to_s) { enabled }
end
end
end