From 6f59635ca7401e32973f06bcd360737de564eeed Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Thu, 23 Apr 2026 13:23:14 +0000 Subject: [PATCH] Rubocop: RSpec/ExpectChange --- .rubocop_todo.yml | 8 -------- spec/models/crop_spec.rb | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index b7e060af4..d53e413a5 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -311,14 +311,6 @@ RSpec/EmptyLineAfterExample: RSpec/ExampleLength: Max: 27 -# Offense count: 1 -# This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: EnforcedStyle. -# SupportedStyles: method_call, block -RSpec/ExpectChange: - Exclude: - - 'spec/models/crop_spec.rb' - # Offense count: 32 RSpec/ExpectInHook: Exclude: diff --git a/spec/models/crop_spec.rb b/spec/models/crop_spec.rb index dce3bfa70..976743d8f 100644 --- a/spec/models/crop_spec.rb +++ b/spec/models/crop_spec.rb @@ -554,7 +554,7 @@ describe Crop do end it "destroys companion links" do - expect { crop_a.destroy }.to change { CropCompanion.count }.from(2).to(0) + expect { crop_a.destroy }.to change(CropCompanion, :count).from(2).to(0) end end