summaryrefslogtreecommitdiff
path: root/spec/support/shared_contexts/lib/api/helpers/packages/dependency_proxy_helpers_shared_context.rb
blob: 7c8b6250d2441f785ed8981896d1ea008e308a79 (plain)
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true

RSpec.shared_context 'dependency proxy helpers context' do
  def allow_fetch_application_setting(attribute:, return_value:)
    attributes = double
    allow(::Gitlab::CurrentSettings.current_application_settings).to receive(:attributes).and_return(attributes)
    allow(attributes).to receive(:fetch).with(attribute, false).and_return(return_value)
  end
end