From f48d345de1093a878fbf8543fe1d6ac1deb95392 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Thu, 27 Jul 2023 08:27:21 -0400 Subject: [PATCH] Use correct naming on controller concern specs (#26197) --- .rubocop.yml | 6 ------ .../controllers/concerns/account_controller_concern_spec.rb | 4 ++-- spec/controllers/concerns/export_controller_concern_spec.rb | 4 ++-- spec/controllers/concerns/localized_spec.rb | 4 ++-- spec/controllers/concerns/rate_limit_headers_spec.rb | 4 ++-- spec/controllers/concerns/signature_verification_spec.rb | 4 ++-- spec/controllers/concerns/user_tracking_concern_spec.rb | 4 ++-- 7 files changed, 12 insertions(+), 18 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index 597dfcb9e0..9ebb0219bf 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -131,12 +131,6 @@ RSpec/FilePath: Exclude: - 'spec/config/initializers/rack_attack_spec.rb' # namespaces usually have separate folder - 'spec/lib/sanitize_config_spec.rb' # namespaces usually have separate folder - - 'spec/controllers/concerns/account_controller_concern_spec.rb' # Concerns describe ApplicationController and don't fit naming - - 'spec/controllers/concerns/export_controller_concern_spec.rb' - - 'spec/controllers/concerns/localized_spec.rb' - - 'spec/controllers/concerns/rate_limit_headers_spec.rb' - - 'spec/controllers/concerns/signature_verification_spec.rb' - - 'spec/controllers/concerns/user_tracking_concern_spec.rb' # Reason: # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnamedsubject diff --git a/spec/controllers/concerns/account_controller_concern_spec.rb b/spec/controllers/concerns/account_controller_concern_spec.rb index 57fc6f9653..d080475c32 100644 --- a/spec/controllers/concerns/account_controller_concern_spec.rb +++ b/spec/controllers/concerns/account_controller_concern_spec.rb @@ -2,8 +2,8 @@ require 'rails_helper' -describe ApplicationController do - controller do +describe AccountControllerConcern do + controller(ApplicationController) do include AccountControllerConcern def success diff --git a/spec/controllers/concerns/export_controller_concern_spec.rb b/spec/controllers/concerns/export_controller_concern_spec.rb index b380246e7e..e253aa5206 100644 --- a/spec/controllers/concerns/export_controller_concern_spec.rb +++ b/spec/controllers/concerns/export_controller_concern_spec.rb @@ -2,8 +2,8 @@ require 'rails_helper' -describe ApplicationController do - controller do +describe ExportControllerConcern do + controller(ApplicationController) do include ExportControllerConcern def index diff --git a/spec/controllers/concerns/localized_spec.rb b/spec/controllers/concerns/localized_spec.rb index caac94ea95..ce31e786f0 100644 --- a/spec/controllers/concerns/localized_spec.rb +++ b/spec/controllers/concerns/localized_spec.rb @@ -2,8 +2,8 @@ require 'rails_helper' -describe ApplicationController do - controller do +describe Localized do + controller(ApplicationController) do include Localized def success diff --git a/spec/controllers/concerns/rate_limit_headers_spec.rb b/spec/controllers/concerns/rate_limit_headers_spec.rb index 7e1f92546d..1cdf741f4d 100644 --- a/spec/controllers/concerns/rate_limit_headers_spec.rb +++ b/spec/controllers/concerns/rate_limit_headers_spec.rb @@ -2,8 +2,8 @@ require 'rails_helper' -describe ApplicationController do - controller do +describe RateLimitHeaders do + controller(ApplicationController) do include RateLimitHeaders def show diff --git a/spec/controllers/concerns/signature_verification_spec.rb b/spec/controllers/concerns/signature_verification_spec.rb index e6b7f18498..650cd21eaf 100644 --- a/spec/controllers/concerns/signature_verification_spec.rb +++ b/spec/controllers/concerns/signature_verification_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -describe ApplicationController do +describe SignatureVerification do let(:wrapped_actor_class) do Class.new do attr_reader :wrapped_account @@ -15,7 +15,7 @@ describe ApplicationController do end end - controller do + controller(ApplicationController) do include SignatureVerification before_action :require_actor_signature!, only: [:signature_required] diff --git a/spec/controllers/concerns/user_tracking_concern_spec.rb b/spec/controllers/concerns/user_tracking_concern_spec.rb index 8e272468b6..dd0b3c042a 100644 --- a/spec/controllers/concerns/user_tracking_concern_spec.rb +++ b/spec/controllers/concerns/user_tracking_concern_spec.rb @@ -2,8 +2,8 @@ require 'rails_helper' -describe ApplicationController do - controller do +describe UserTrackingConcern do + controller(ApplicationController) do include UserTrackingConcern def show