From 2a54fd9c340afc6b1b12de680c465802fcd9b3f5 Mon Sep 17 00:00:00 2001 From: ydah <13041216+ydah@users.noreply.github.com> Date: Mon, 11 Sep 2023 13:12:42 +0900 Subject: [PATCH] Fix an error when using `inherit_gem: rubocop-rspec: config/default.yml` --- CHANGELOG.md | 2 ++ config/obsoletion.yml | 6 ------ docs/modules/ROOT/pages/cops_rspec.adoc | 6 ++++++ lib/rubocop/cop/rspec/file_path.rb | 6 ++++++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae7fd53a8..6cb3f1b37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Master (Unreleased) +- Fix an error when using `inherit_gem: rubocop-rspec: config/default.yml`. ([@ydah]) + ## 2.24.0 (2023-09-08) - Split `RSpec/FilePath` into `RSpec/SpecFilePathSuffix` and `RSpec/SpecFilePathFormat`. `RSpec/FilePath` cop is enabled by default, the two new cops are pending and need to be enabled explicitly. ([@ydah]) diff --git a/config/obsoletion.yml b/config/obsoletion.yml index 0a5a771fd..d38b0a973 100644 --- a/config/obsoletion.yml +++ b/config/obsoletion.yml @@ -27,9 +27,3 @@ renamed: RSpec/FactoryBot/FactoryClassName: FactoryBot/FactoryClassName RSpec/FactoryBot/FactoryNameStyle: FactoryBot/FactoryNameStyle RSpec/FactoryBot/SyntaxMethods: FactoryBot/SyntaxMethods - -split: - RSpec/FilePath: - alternatives: - - RSpec/SpecFilePathFormat - - RSpec/SpecFilePathSuffix diff --git a/docs/modules/ROOT/pages/cops_rspec.adoc b/docs/modules/ROOT/pages/cops_rspec.adoc index 58de73def..8a4d73858 100644 --- a/docs/modules/ROOT/pages/cops_rspec.adoc +++ b/docs/modules/ROOT/pages/cops_rspec.adoc @@ -2012,6 +2012,12 @@ expect { my_app.print_report }.to output('Hello World').to_stdout Checks that spec file paths are consistent and well-formed. +This cop is deprecated. +We plan to remove it in the next major version update to 3.0. +The migration destinations are `RSpec/SpecFilePathSuffix` +and `RSpec/SpecFilePathFormat`. +If you are using this cop, please plan for migration. + By default, this checks that spec file paths are consistent with the test subject and enforces that it reflects the described class/module and its optionally called out method. diff --git a/lib/rubocop/cop/rspec/file_path.rb b/lib/rubocop/cop/rspec/file_path.rb index c8c104fb1..20256e2dd 100644 --- a/lib/rubocop/cop/rspec/file_path.rb +++ b/lib/rubocop/cop/rspec/file_path.rb @@ -5,6 +5,12 @@ module Cop module RSpec # Checks that spec file paths are consistent and well-formed. # + # This cop is deprecated. + # We plan to remove it in the next major version update to 3.0. + # The migration destinations are `RSpec/SpecFilePathSuffix` + # and `RSpec/SpecFilePathFormat`. + # If you are using this cop, please plan for migration. + # # By default, this checks that spec file paths are consistent with the # test subject and enforces that it reflects the described # class/module and its optionally called out method.