summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-11-14 22:19:20 +0000
committerRobert Speicher <robert@gitlab.com>2017-11-14 22:19:20 +0000
commit475e33c0bb4733f0cae56e47fdb7eef6a64fde7f (patch)
tree8947b6ad2217051534d5b9345276e09a4e68e152
parentaad635a2837a2158aac138dade18041c9191487b (diff)
parent6545e56d929d7e3df4c176e8f2f0c64c784857a0 (diff)
downloadgitlab-ce-475e33c0bb4733f0cae56e47fdb7eef6a64fde7f.tar.gz
Merge branch 'gitaly-fix-broken-specs' into 'master'
skip_gitaly_mock disables Gitaly in specs See merge request gitlab-org/gitlab-ce!15383
-rw-r--r--spec/support/gitaly.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/support/gitaly.rb b/spec/support/gitaly.rb
index 89fb362cf14..1512b3e0620 100644
--- a/spec/support/gitaly.rb
+++ b/spec/support/gitaly.rb
@@ -1,6 +1,10 @@
RSpec.configure do |config|
config.before(:each) do |example|
- next if example.metadata[:skip_gitaly_mock]
- allow(Gitlab::GitalyClient).to receive(:feature_enabled?).and_return(true)
+ 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