From 2332d429537070a515c9a30b4df0b6781897d670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Ferrandis?= Date: Tue, 10 Aug 2021 09:50:57 +0200 Subject: [PATCH] Set SafeAutoCorrect: false for ExpectChange --- CHANGELOG.md | 2 ++ config/default.yml | 2 ++ docs/modules/ROOT/pages/cops_rspec.adoc | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a317d2a41..2f4ff2bee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Master (Unreleased) +* Declare autocorrect as unsafe for `ExpectChange`. ([@francois-ferrandis][]) * Fix each example for `RSpec/HookArgument`. ([@lokhi][]) * Exclude unrelated Rails directories from `RSpec/DescribeClass`. ([@MothOnMars][]) * Add `RSpec/ExcessiveDocstringSpacing` cop. ([@G-Rath][]) @@ -635,3 +636,4 @@ Compatibility release so users can upgrade RuboCop to 0.51.0. No new features. [@MothOnMars]: https://github.com/MothOnMars [@G-Rath]: https://github.com/G-Rath [@dswij]: https://github.com/dswij +[@francois-ferrandis]: https://github.com/francois-ferrandis diff --git a/config/default.yml b/config/default.yml index 481d0259a..1d68602d9 100644 --- a/config/default.yml +++ b/config/default.yml @@ -309,7 +309,9 @@ RSpec/ExpectChange: SupportedStyles: - method_call - block + SafeAutoCorrect: false VersionAdded: '1.22' + VersionChanged: 2.5.0 StyleGuide: https://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExpectChange RSpec/ExpectInHook: diff --git a/docs/modules/ROOT/pages/cops_rspec.adoc b/docs/modules/ROOT/pages/cops_rspec.adoc index 51b1b55e1..4ad966ecf 100644 --- a/docs/modules/ROOT/pages/cops_rspec.adoc +++ b/docs/modules/ROOT/pages/cops_rspec.adoc @@ -1366,9 +1366,9 @@ expect(name).to eq("John") | Enabled | Yes -| Yes +| Yes (Unsafe) | 1.22 -| - +| 2.5.0 |=== Checks for consistent style of change matcher.