Remove unnecessary clear_stubs calls
This commit is contained in:
parent
f39fe34afb
commit
ec35a9e860
|
@ -5,11 +5,6 @@ describe Gitlab::Git::Repository, seed_helper: true do
|
||||||
|
|
||||||
let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH) }
|
let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH) }
|
||||||
|
|
||||||
after do
|
|
||||||
# Prevent cached stubs (gRPC connection objects) from poisoning tests.
|
|
||||||
Gitlab::GitalyClient.clear_stubs!
|
|
||||||
end
|
|
||||||
|
|
||||||
describe "Respond to" do
|
describe "Respond to" do
|
||||||
subject { repository }
|
subject { repository }
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,6 @@ describe Gitlab::GitalyClient::Ref do
|
||||||
let(:relative_path) { project.path_with_namespace + '.git' }
|
let(:relative_path) { project.path_with_namespace + '.git' }
|
||||||
let(:client) { described_class.new(project.repository) }
|
let(:client) { described_class.new(project.repository) }
|
||||||
|
|
||||||
after do
|
|
||||||
# When we say `expect_any_instance_of(Gitaly::Ref::Stub)` a double is created,
|
|
||||||
# and because GitalyClient shares stubs these will get passed from example to
|
|
||||||
# example, which will cause an error, so we clean the stubs after each example.
|
|
||||||
Gitlab::GitalyClient.clear_stubs!
|
|
||||||
end
|
|
||||||
|
|
||||||
describe '#branch_names' do
|
describe '#branch_names' do
|
||||||
it 'sends a find_all_branch_names message' do
|
it 'sends a find_all_branch_names message' do
|
||||||
expect_any_instance_of(Gitaly::Ref::Stub)
|
expect_any_instance_of(Gitaly::Ref::Stub)
|
||||||
|
|
Loading…
Reference in New Issue