summaryrefslogtreecommitdiff
path: root/spec/support/gitaly.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/gitaly.rb')
-rw-r--r--spec/support/gitaly.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/support/gitaly.rb b/spec/support/gitaly.rb
index 89fb362cf14..c7e8a39a617 100644
--- a/spec/support/gitaly.rb
+++ b/spec/support/gitaly.rb
@@ -1,6 +1,11 @@
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