summaryrefslogtreecommitdiff
path: root/spec/support/stub_feature_flags.rb
blob: b96338bf548b2510597b0bcbd1a43b798ac34855 (plain)
1
2
3
4
5
6
7
8
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