Rubocop: Rails/RedundantActiveRecordAllMethod

This commit is contained in:
Daniel O'Connor
2026-04-23 13:48:17 +00:00
parent aa1c9ceb05
commit 3f6dd59dfa
2 changed files with 1 additions and 2 deletions

View File

@@ -614,7 +614,6 @@ Rails/RedundantActiveRecordAllMethod:
- 'app/controllers/scientific_names_controller.rb'
- 'spec/features/members/deletion_spec.rb'
- 'spec/features/percy/percy_spec.rb'
- 'spec/models/harvest_spec.rb'
# Offense count: 5
# This cop supports unsafe autocorrection (--autocorrect-all).

View File

@@ -144,7 +144,7 @@ describe Harvest do
it 'lists most recent harvests first' do
@h1 = create(:harvest, created_at: 1.day.ago)
@h2 = create(:harvest, created_at: 1.hour.ago)
expect(described_class.all.order(created_at: :desc)).to eq [@h2, @h1]
expect(described_class.order(created_at: :desc)).to eq [@h2, @h1]
end
end