Add Rails/RedundantTravelBack rubocop rule

This rule was added in rubocop-rails 2.12.0. It doesn't catch the case
we've seen the most in the past, though: using `travel_back` to finish
the test will not raise an offense.

However, it does detect a useless `travel_back` call in `after` blocks,
so I guess it's better than nothing.
This commit is contained in:
Javi Martín
2022-08-24 22:17:12 +02:00
parent fc757428ef
commit 68899c80b6

View File

@@ -300,6 +300,9 @@ Rails/PluralizationGrammar:
Rails/Presence: Rails/Presence:
Enabled: true Enabled: true
Rails/RedundantTravelBack:
Enabled: true
Rails/RelativeDateConstant: Rails/RelativeDateConstant:
Enabled: true Enabled: true