Skip to content

Commit 101f7cd

Browse files
committed
autofix RSpec/ReceiveMessages
1 parent 5330eb2 commit 101f7cd

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

Diff for: .rubocop_todo.yml

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2025-04-04 23:05:51 UTC using RuboCop version 1.75.1.
3+
# on 2025-04-04 23:07:22 UTC using RuboCop version 1.75.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -13,12 +13,6 @@
1313
RSpec/MetadataStyle:
1414
Enabled: false
1515

16-
# Offense count: 2
17-
# This cop supports unsafe autocorrection (--autocorrect-all).
18-
RSpec/ReceiveMessages:
19-
Exclude:
20-
- 'spec/models/widget_spec.rb'
21-
2216
# Offense count: 1
2317
# This cop supports unsafe autocorrection (--autocorrect-all).
2418
Rails/ActiveSupportOnLoad:

Diff for: spec/models/widget_spec.rb

+4-2
Original file line numberDiff line numberDiff line change
@@ -678,8 +678,10 @@
678678
# Json fields for `object` & `object_changes` attributes is most efficient way
679679
# to do the things - this way we will save even more RAM, as well as will skip
680680
# the whole YAML serialization
681-
allow(PaperTrail::Version).to receive(:object_changes_col_is_json?).and_return(true)
682-
allow(PaperTrail::Version).to receive(:object_col_is_json?).and_return(true)
681+
allow(PaperTrail::Version).to receive_messages(
682+
object_changes_col_is_json?: true,
683+
object_col_is_json?: true
684+
)
683685

684686
# Force the loading of all lazy things like class definitions,
685687
# in order to get the pure benchmark

0 commit comments

Comments
 (0)