From 0e0550e1fc69f0d716d098e335998b5062e5f776 Mon Sep 17 00:00:00 2001 From: Benjamin Quorning Date: Sun, 19 May 2024 22:36:57 +0200 Subject: [PATCH] Don't require rubocop/rspec/language/node_pattern The node_pattern file has been removed from rubocop-rspec, and we should no longer require it. Also, the `RSpec/FilePath` has been split and `RSpec/SpecFilePathFormat` can be configured to work instead. --- .rubocop.yml | 7 ++++--- Gemfile | 2 +- lib/rubocop-rspec_rails.rb | 3 --- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index cc9d7ca4..e3a1e9cc 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -98,9 +98,6 @@ RSpec/ExampleLength: - heredoc Max: 11 -RSpec/FilePath: - Enabled: false - RSpec/DescribeClass: Exclude: - spec/project/**/*.rb @@ -184,6 +181,10 @@ RSpec/SkipBlockInsideExample: Enabled: true RSpec/SortMetadata: Enabled: true +RSpec/SpecFilePathFormat: + Enabled: true + CustomTransform: + RSpecRails: rspec_rails RSpec/SpecFilePathSuffix: Enabled: true RSpec/SubjectDeclaration: diff --git a/Gemfile b/Gemfile index a1e1c2f9..ec04ea73 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,7 @@ gem 'simplecov', '>= 0.19' gem 'yard' # TODO: Move to gemspec when RuboCop RSpec v3 is released. -gem 'rubocop-rspec', '~> 2.27' +gem 'rubocop-rspec', github: 'rubocop/rubocop-rspec', ref: '1a8e9cb8b044983c94d' local_gemfile = 'Gemfile.local' eval_gemfile(local_gemfile) if File.exist?(local_gemfile) diff --git a/lib/rubocop-rspec_rails.rb b/lib/rubocop-rspec_rails.rb index 6b56a9f0..a818fc9f 100644 --- a/lib/rubocop-rspec_rails.rb +++ b/lib/rubocop-rspec_rails.rb @@ -4,9 +4,6 @@ require 'yaml' require 'rubocop' - -require 'rubocop/rspec/language/node_pattern' - require 'rubocop/rspec/language' require_relative 'rubocop/rspec_rails/version'