Fix RSpec/VerifiedDoubles cop (#25469)

This commit is contained in:
Matt Jankowski 2023-06-22 08:55:22 -04:00 committed by GitHub
parent 38433ccd0b
commit 05f9e39b32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 162 additions and 172 deletions

View file

@ -11,7 +11,7 @@ describe FeedInsertWorker do
context 'when there are no records' do
it 'skips push with missing status' do
instance = double(push_to_home: nil)
instance = instance_double(FeedManager, push_to_home: nil)
allow(FeedManager).to receive(:instance).and_return(instance)
result = subject.perform(nil, follower.id)
@ -20,7 +20,7 @@ describe FeedInsertWorker do
end
it 'skips push with missing account' do
instance = double(push_to_home: nil)
instance = instance_double(FeedManager, push_to_home: nil)
allow(FeedManager).to receive(:instance).and_return(instance)
result = subject.perform(status.id, nil)
@ -31,7 +31,7 @@ describe FeedInsertWorker do
context 'when there are real records' do
it 'skips the push when there is a filter' do
instance = double(push_to_home: nil, filter?: true)
instance = instance_double(FeedManager, push_to_home: nil, filter?: true)
allow(FeedManager).to receive(:instance).and_return(instance)
result = subject.perform(status.id, follower.id)
@ -40,7 +40,7 @@ describe FeedInsertWorker do
end
it 'pushes the status onto the home timeline without filter' do
instance = double(push_to_home: nil, filter?: false)
instance = instance_double(FeedManager, push_to_home: nil, filter?: false)
allow(FeedManager).to receive(:instance).and_return(instance)
result = subject.perform(status.id, follower.id)