Use correct naming on controller concern specs (#26197)

lolsob-rspec
Matt Jankowski 2023-07-27 08:27:21 -04:00 committed by GitHub
parent 991df39b0a
commit 61ee553176
7 changed files with 12 additions and 18 deletions

View File

@ -131,12 +131,6 @@ RSpec/FilePath:
Exclude: Exclude:
- 'spec/config/initializers/rack_attack_spec.rb' # namespaces usually have separate folder - 'spec/config/initializers/rack_attack_spec.rb' # namespaces usually have separate folder
- 'spec/lib/sanitize_config_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: # Reason:
# https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnamedsubject # https://docs.rubocop.org/rubocop-rspec/cops_rspec.html#rspecnamedsubject

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
require 'rails_helper' require 'rails_helper'
describe ApplicationController do describe SignatureVerification do
let(:wrapped_actor_class) do let(:wrapped_actor_class) do
Class.new do Class.new do
attr_reader :wrapped_account attr_reader :wrapped_account
@ -15,7 +15,7 @@ describe ApplicationController do
end end
end end
controller do controller(ApplicationController) do
include SignatureVerification include SignatureVerification
before_action :require_actor_signature!, only: [:signature_required] before_action :require_actor_signature!, only: [:signature_required]

View File

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