Fix Performance/TimesMap cop (#24789)
This commit is contained in:
@ -902,7 +902,7 @@ RSpec.describe Account, type: :model do
|
||||
|
||||
describe 'recent' do
|
||||
it 'returns a relation of accounts sorted by recent creation' do
|
||||
matches = 2.times.map { Fabricate(:account) }
|
||||
matches = Array.new(2) { Fabricate(:account) }
|
||||
expect(Account.where('id > 0').recent).to match_array(matches)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user