summaryrefslogtreecommitdiff
path: root/spec/support/gitaly.rb
blob: c7e8a39a6170dbc24c0984ec1d0f5a11e81c7858 (plain)
1
2
3
4
5
6
7
8
9
10
11
RSpec.configure do |config|
  config.before(:each) do |example|
    if example.metadata[:disable_gitaly]
      allow(Gitlab::GitalyClient).to receive(:feature_enabled?).and_return(false)
    else
      next if example.metadata[:skip_gitaly_mock]

      allow(Gitlab::GitalyClient).to receive(:feature_enabled?).and_return(true)
    end
  end
end