0
0
Fork 0

Fix RSpec/DescribedClass cop (#25104)

This commit is contained in:
Matt Jankowski 2023-06-06 07:58:33 -04:00 committed by GitHub
parent 1e243e2df7
commit c42591356d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
66 changed files with 347 additions and 414 deletions

View file

@ -7,7 +7,7 @@ RSpec.describe Follow do
let(:bob) { Fabricate(:account, username: 'bob') }
describe 'validations' do
subject { Follow.new(account: alice, target_account: bob, rate_limit: true) }
subject { described_class.new(account: alice, target_account: bob, rate_limit: true) }
it 'is invalid without an account' do
follow = Fabricate.build(:follow, account: nil)
@ -38,10 +38,10 @@ RSpec.describe Follow do
describe 'recent' do
it 'sorts so that more recent follows comes earlier' do
follow0 = Follow.create!(account: alice, target_account: bob)
follow1 = Follow.create!(account: bob, target_account: alice)
follow0 = described_class.create!(account: alice, target_account: bob)
follow1 = described_class.create!(account: bob, target_account: alice)
a = Follow.recent.to_a
a = described_class.recent.to_a
expect(a.size).to eq 2
expect(a[0]).to eq follow1