Commit ea48ba9f authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre 🌴

Use spy over double.as_null_object

parent 6dbf8279
......@@ -13,7 +13,7 @@ describe Geo::GeoBackfillWorker, services: true do
end
it 'performs GeoSingleRepositoryBackfillWorker for each project' do
expect(GeoSingleRepositoryBackfillWorker).to receive(:new).twice.and_return(double.as_null_object)
expect(GeoSingleRepositoryBackfillWorker).to receive(:new).twice.and_return(spy)
subject.perform
end
......@@ -29,7 +29,7 @@ describe Geo::GeoBackfillWorker, services: true do
it 'does not perform GeoSingleRepositoryBackfillWorker for projects that repository exists' do
create_list(:project, 2)
expect(GeoSingleRepositoryBackfillWorker).to receive(:new).twice.and_return(double.as_null_object)
expect(GeoSingleRepositoryBackfillWorker).to receive(:new).twice.and_return(spy)
subject.perform
end
......
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