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

@ -16,7 +16,7 @@ RSpec.describe SessionActivation do
allow(session_activation).to receive(:detection).and_return(detection)
end
let(:detection) { double(id: 1) }
let(:detection) { instance_double(Browser::Chrome, id: 1) }
let(:session_activation) { Fabricate(:session_activation) }
it 'returns detection.id' do
@ -30,7 +30,7 @@ RSpec.describe SessionActivation do
end
let(:session_activation) { Fabricate(:session_activation) }
let(:detection) { double(platform: double(id: 1)) }
let(:detection) { instance_double(Browser::Chrome, platform: instance_double(Browser::Platform, id: 1)) }
it 'returns detection.platform.id' do
expect(session_activation.platform).to be 1