Welcome to mirror list, hosted at ThFree Co, Russian Federation.

stub_feature_flags.rb « helpers « support « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
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