diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2018-03-27 20:39:18 +0300 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2018-03-27 20:39:18 +0300 |
commit | de0c4730bb83b94195678e5ad4865ea648e6585f (patch) | |
tree | 3ea0fd48c5736b0f5b328f117c3db0508a371d22 /spec/support/gitaly.rb | |
parent | dc5b5130d573a48fc34fa62862a1ad6da776b0d0 (diff) | |
parent | a1cde68d208437a470267e28ccff66fe8be88c2e (diff) |
Merge branch 'master' into add-canary-favicon
Diffstat (limited to 'spec/support/gitaly.rb')
-rw-r--r-- | spec/support/gitaly.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/support/gitaly.rb b/spec/support/gitaly.rb index 2bf159002a0..c7e8a39a617 100644 --- a/spec/support/gitaly.rb +++ b/spec/support/gitaly.rb @@ -1,7 +1,10 @@ -if Gitlab::GitalyClient.enabled? - RSpec.configure do |config| - config.before(:each) do |example| +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 |