Use correct naming on controller concern specs (#26197)

This commit is contained in:
Matt Jankowski 2023-07-27 08:27:21 -04:00 committed by GitHub
parent b06763dc11
commit f48d345de1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 12 additions and 18 deletions

View file

@ -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

View file

@ -2,8 +2,8 @@
require 'rails_helper'
describe ApplicationController do
controller do
describe AccountControllerConcern do
controller(ApplicationController) do
include AccountControllerConcern
def success

View file

@ -2,8 +2,8 @@
require 'rails_helper'
describe ApplicationController do
controller do
describe ExportControllerConcern do
controller(ApplicationController) do
include ExportControllerConcern
def index

View file

@ -2,8 +2,8 @@
require 'rails_helper'
describe ApplicationController do
controller do
describe Localized do
controller(ApplicationController) do
include Localized
def success

View file

@ -2,8 +2,8 @@
require 'rails_helper'
describe ApplicationController do
controller do
describe RateLimitHeaders do
controller(ApplicationController) do
include RateLimitHeaders
def show

View file

@ -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]

View file

@ -2,8 +2,8 @@
require 'rails_helper'
describe ApplicationController do
controller do
describe UserTrackingConcern do
controller(ApplicationController) do
include UserTrackingConcern
def show