Use correct naming on controller concern specs (#26197)

local
Matt Jankowski 10 months ago committed by GitHub
parent b06763dc11
commit f48d345de1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      .rubocop.yml
  2. 4
      spec/controllers/concerns/account_controller_concern_spec.rb
  3. 4
      spec/controllers/concerns/export_controller_concern_spec.rb
  4. 4
      spec/controllers/concerns/localized_spec.rb
  5. 4
      spec/controllers/concerns/rate_limit_headers_spec.rb
  6. 4
      spec/controllers/concerns/signature_verification_spec.rb
  7. 4
      spec/controllers/concerns/user_tracking_concern_spec.rb

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

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

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

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

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

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

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

Loading…
Cancel
Save