From 68899c80b6f6df35e539083bf1a326fabac8e150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Wed, 24 Aug 2022 22:17:12 +0200 Subject: [PATCH] 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. --- .rubocop.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index 61ec40311..30a9dd223 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -300,6 +300,9 @@ Rails/PluralizationGrammar: Rails/Presence: Enabled: true +Rails/RedundantTravelBack: + Enabled: true + Rails/RelativeDateConstant: Enabled: true