Commit ebbe1879 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'spec-improvements' into 'master'

Use expect_any_instance_of not to receive on repository backfill spec

See merge request !1477
parents 636e1023 83e6de25
......@@ -68,15 +68,9 @@ describe Geo::RepositoryBackfillService, services: true do
let(:project) { create(:project) }
it 'does not fetch the project repositories' do
fetch_count = 0
allow_any_instance_of(Repository).to receive(:fetch_geo_mirror) do
fetch_count += 1
end
expect_any_instance_of(Repository).not_to receive(:fetch_geo_mirror)
subject.execute
expect(fetch_count).to eq 0
end
context 'tracking database' do
......@@ -98,15 +92,9 @@ describe Geo::RepositoryBackfillService, services: true do
end
it 'does not fetch the project repositories' do
fetch_count = 0
allow_any_instance_of(Repository).to receive(:fetch_geo_mirror) do
fetch_count += 1
end
expect_any_instance_of(Repository).not_to receive(:fetch_geo_mirror)
subject.execute
expect(fetch_count).to eq 0
end
context 'tracking database' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment