Commit dad959bd authored by Peter Leitzen's avatar Peter Leitzen

Set spec type :rubocop for all Rubocop specs

This includes some helpful Rubocop helpers for every
Rubocop spec automatically and reduces the noise of adding
`type: :rubocop`.
parent bbab9419
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../rubocop/cop/active_record_association_reload' require_relative '../../../rubocop/cop/active_record_association_reload'
RSpec.describe RuboCop::Cop::ActiveRecordAssociationReload, type: :rubocop do RSpec.describe RuboCop::Cop::ActiveRecordAssociationReload do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/api/base' require_relative '../../../../rubocop/cop/api/base'
RSpec.describe RuboCop::Cop::API::Base, type: :rubocop do RSpec.describe RuboCop::Cop::API::Base do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/avoid_becomes' require_relative '../../../rubocop/cop/avoid_becomes'
RSpec.describe RuboCop::Cop::AvoidBecomes, type: :rubocop do RSpec.describe RuboCop::Cop::AvoidBecomes do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../rubocop/cop/avoid_break_from_strong_memoize' require_relative '../../../rubocop/cop/avoid_break_from_strong_memoize'
RSpec.describe RuboCop::Cop::AvoidBreakFromStrongMemoize, type: :rubocop do RSpec.describe RuboCop::Cop::AvoidBreakFromStrongMemoize do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/avoid_keyword_arguments_in_sidekiq_workers' require_relative '../../../rubocop/cop/avoid_keyword_arguments_in_sidekiq_workers'
RSpec.describe RuboCop::Cop::AvoidKeywordArgumentsInSidekiqWorkers, type: :rubocop do RSpec.describe RuboCop::Cop::AvoidKeywordArgumentsInSidekiqWorkers do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../rubocop/cop/avoid_return_from_blocks' require_relative '../../../rubocop/cop/avoid_return_from_blocks'
RSpec.describe RuboCop::Cop::AvoidReturnFromBlocks, type: :rubocop do RSpec.describe RuboCop::Cop::AvoidReturnFromBlocks do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../rubocop/cop/avoid_route_redirect_leading_slash' require_relative '../../../rubocop/cop/avoid_route_redirect_leading_slash'
RSpec.describe RuboCop::Cop::AvoidRouteRedirectLeadingSlash, type: :rubocop do RSpec.describe RuboCop::Cop::AvoidRouteRedirectLeadingSlash do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/ban_catch_throw' require_relative '../../../rubocop/cop/ban_catch_throw'
RSpec.describe RuboCop::Cop::BanCatchThrow, type: :rubocop do RSpec.describe RuboCop::Cop::BanCatchThrow do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/finder' require_relative '../../../../rubocop/cop/code_reuse/finder'
RSpec.describe RuboCop::Cop::CodeReuse::Finder, type: :rubocop do RSpec.describe RuboCop::Cop::CodeReuse::Finder do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/presenter' require_relative '../../../../rubocop/cop/code_reuse/presenter'
RSpec.describe RuboCop::Cop::CodeReuse::Presenter, type: :rubocop do RSpec.describe RuboCop::Cop::CodeReuse::Presenter do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/serializer' require_relative '../../../../rubocop/cop/code_reuse/serializer'
RSpec.describe RuboCop::Cop::CodeReuse::Serializer, type: :rubocop do RSpec.describe RuboCop::Cop::CodeReuse::Serializer do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/service_class' require_relative '../../../../rubocop/cop/code_reuse/service_class'
RSpec.describe RuboCop::Cop::CodeReuse::ServiceClass, type: :rubocop do RSpec.describe RuboCop::Cop::CodeReuse::ServiceClass do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/worker' require_relative '../../../../rubocop/cop/code_reuse/worker'
RSpec.describe RuboCop::Cop::CodeReuse::Worker, type: :rubocop do RSpec.describe RuboCop::Cop::CodeReuse::Worker do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/default_scope' require_relative '../../../rubocop/cop/default_scope'
RSpec.describe RuboCop::Cop::DefaultScope, type: :rubocop do RSpec.describe RuboCop::Cop::DefaultScope do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/destroy_all' require_relative '../../../rubocop/cop/destroy_all'
RSpec.describe RuboCop::Cop::DestroyAll, type: :rubocop do RSpec.describe RuboCop::Cop::DestroyAll do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/filename_length' require_relative '../../../rubocop/cop/filename_length'
RSpec.describe RuboCop::Cop::FilenameLength, type: :rubocop do RSpec.describe RuboCop::Cop::FilenameLength do
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
it 'does not flag files with names 100 characters long' do it 'does not flag files with names 100 characters long' do
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/avoid_uploaded_file_from_params' require_relative '../../../../rubocop/cop/gitlab/avoid_uploaded_file_from_params'
RSpec.describe RuboCop::Cop::Gitlab::AvoidUploadedFileFromParams, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::AvoidUploadedFileFromParams do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/bulk_insert' require_relative '../../../../rubocop/cop/gitlab/bulk_insert'
RSpec.describe RuboCop::Cop::Gitlab::BulkInsert, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::BulkInsert do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/change_timzone' require_relative '../../../../rubocop/cop/gitlab/change_timzone'
RSpec.describe RuboCop::Cop::Gitlab::ChangeTimezone, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::ChangeTimezone do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/const_get_inherit_false' require_relative '../../../../rubocop/cop/gitlab/const_get_inherit_false'
RSpec.describe RuboCop::Cop::Gitlab::ConstGetInheritFalse, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::ConstGetInheritFalse do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require_relative '../../../../rubocop/cop/gitlab/duplicate_spec_location' require_relative '../../../../rubocop/cop/gitlab/duplicate_spec_location'
RSpec.describe RuboCop::Cop::Gitlab::DuplicateSpecLocation, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::DuplicateSpecLocation do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/except' require_relative '../../../../rubocop/cop/gitlab/except'
RSpec.describe RuboCop::Cop::Gitlab::Except, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::Except do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/finder_with_find_by' require_relative '../../../../rubocop/cop/gitlab/finder_with_find_by'
RSpec.describe RuboCop::Cop::Gitlab::FinderWithFindBy, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::FinderWithFindBy do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/httparty' require_relative '../../../../rubocop/cop/gitlab/httparty'
RSpec.describe RuboCop::Cop::Gitlab::HTTParty, type: :rubocop do # rubocop:disable RSpec/FilePath RSpec.describe RuboCop::Cop::Gitlab::HTTParty do # rubocop:disable RSpec/FilePath
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/intersect' require_relative '../../../../rubocop/cop/gitlab/intersect'
RSpec.describe RuboCop::Cop::Gitlab::Intersect, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::Intersect do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/json' require_relative '../../../../rubocop/cop/gitlab/json'
RSpec.describe RuboCop::Cop::Gitlab::Json, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::Json do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/module_with_instance_variables' require_relative '../../../../rubocop/cop/gitlab/module_with_instance_variables'
RSpec.describe RuboCop::Cop::Gitlab::ModuleWithInstanceVariables, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::ModuleWithInstanceVariables do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/policy_rule_boolean' require_relative '../../../../rubocop/cop/gitlab/policy_rule_boolean'
RSpec.describe RuboCop::Cop::Gitlab::PolicyRuleBoolean, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::PolicyRuleBoolean do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/predicate_memoization' require_relative '../../../../rubocop/cop/gitlab/predicate_memoization'
RSpec.describe RuboCop::Cop::Gitlab::PredicateMemoization, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::PredicateMemoization do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/rails_logger' require_relative '../../../../rubocop/cop/gitlab/rails_logger'
RSpec.describe RuboCop::Cop::Gitlab::RailsLogger, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::RailsLogger do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/union' require_relative '../../../../rubocop/cop/gitlab/union'
RSpec.describe RuboCop::Cop::Gitlab::Union, type: :rubocop do RSpec.describe RuboCop::Cop::Gitlab::Union do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require_relative '../../../../rubocop/cop/graphql/authorize_types' require_relative '../../../../rubocop/cop/graphql/authorize_types'
RSpec.describe RuboCop::Cop::Graphql::AuthorizeTypes, type: :rubocop do RSpec.describe RuboCop::Cop::Graphql::AuthorizeTypes do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/graphql/descriptions' require_relative '../../../../rubocop/cop/graphql/descriptions'
RSpec.describe RuboCop::Cop::Graphql::Descriptions, type: :rubocop do RSpec.describe RuboCop::Cop::Graphql::Descriptions do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require_relative '../../../../rubocop/cop/graphql/gid_expected_type' require_relative '../../../../rubocop/cop/graphql/gid_expected_type'
RSpec.describe RuboCop::Cop::Graphql::GIDExpectedType, type: :rubocop do RSpec.describe RuboCop::Cop::Graphql::GIDExpectedType do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require_relative '../../../../rubocop/cop/graphql/id_type' require_relative '../../../../rubocop/cop/graphql/id_type'
RSpec.describe RuboCop::Cop::Graphql::IDType, type: :rubocop do RSpec.describe RuboCop::Cop::Graphql::IDType do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/graphql/json_type' require_relative '../../../../rubocop/cop/graphql/json_type'
RSpec.describe RuboCop::Cop::Graphql::JSONType, type: :rubocop do RSpec.describe RuboCop::Cop::Graphql::JSONType do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require_relative '../../../../rubocop/cop/graphql/resolver_type' require_relative '../../../../rubocop/cop/graphql/resolver_type'
RSpec.describe RuboCop::Cop::Graphql::ResolverType, type: :rubocop do RSpec.describe RuboCop::Cop::Graphql::ResolverType do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/group_public_or_visible_to_user' require_relative '../../../rubocop/cop/group_public_or_visible_to_user'
RSpec.describe RuboCop::Cop::GroupPublicOrVisibleToUser, type: :rubocop do RSpec.describe RuboCop::Cop::GroupPublicOrVisibleToUser do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/ignored_columns' require_relative '../../../rubocop/cop/ignored_columns'
RSpec.describe RuboCop::Cop::IgnoredColumns, type: :rubocop do RSpec.describe RuboCop::Cop::IgnoredColumns do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/include_sidekiq_worker' require_relative '../../../rubocop/cop/include_sidekiq_worker'
RSpec.describe RuboCop::Cop::IncludeSidekiqWorker, type: :rubocop do RSpec.describe RuboCop::Cop::IncludeSidekiqWorker do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/inject_enterprise_edition_module' require_relative '../../../rubocop/cop/inject_enterprise_edition_module'
RSpec.describe RuboCop::Cop::InjectEnterpriseEditionModule, type: :rubocop do RSpec.describe RuboCop::Cop::InjectEnterpriseEditionModule do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/lint/last_keyword_argument' require_relative '../../../../rubocop/cop/lint/last_keyword_argument'
RSpec.describe RuboCop::Cop::Lint::LastKeywordArgument, type: :rubocop do RSpec.describe RuboCop::Cop::Lint::LastKeywordArgument do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_column_with_default' require_relative '../../../../rubocop/cop/migration/add_column_with_default'
RSpec.describe RuboCop::Cop::Migration::AddColumnWithDefault, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::AddColumnWithDefault do
include CopHelper include CopHelper
let(:cop) { described_class.new } let(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_columns_to_wide_tables' require_relative '../../../../rubocop/cop/migration/add_columns_to_wide_tables'
RSpec.describe RuboCop::Cop::Migration::AddColumnsToWideTables, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::AddColumnsToWideTables do
include CopHelper include CopHelper
let(:cop) { described_class.new } let(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_concurrent_foreign_key' require_relative '../../../../rubocop/cop/migration/add_concurrent_foreign_key'
RSpec.describe RuboCop::Cop::Migration::AddConcurrentForeignKey, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::AddConcurrentForeignKey do
include CopHelper include CopHelper
let(:cop) { described_class.new } let(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_concurrent_index' require_relative '../../../../rubocop/cop/migration/add_concurrent_index'
RSpec.describe RuboCop::Cop::Migration::AddConcurrentIndex, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::AddConcurrentIndex do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_index' require_relative '../../../../rubocop/cop/migration/add_index'
RSpec.describe RuboCop::Cop::Migration::AddIndex, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::AddIndex do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_limit_to_text_columns' require_relative '../../../../rubocop/cop/migration/add_limit_to_text_columns'
RSpec.describe RuboCop::Cop::Migration::AddLimitToTextColumns, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::AddLimitToTextColumns do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_reference' require_relative '../../../../rubocop/cop/migration/add_reference'
RSpec.describe RuboCop::Cop::Migration::AddReference, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::AddReference do
include CopHelper include CopHelper
let(:cop) { described_class.new } let(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/add_timestamps' require_relative '../../../../rubocop/cop/migration/add_timestamps'
RSpec.describe RuboCop::Cop::Migration::AddTimestamps, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::AddTimestamps do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/complex_indexes_require_name' require_relative '../../../../rubocop/cop/migration/complex_indexes_require_name'
RSpec.describe RuboCop::Cop::Migration::ComplexIndexesRequireName, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::ComplexIndexesRequireName do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/create_table_with_foreign_keys' require_relative '../../../../rubocop/cop/migration/create_table_with_foreign_keys'
RSpec.describe RuboCop::Cop::Migration::CreateTableWithForeignKeys, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::CreateTableWithForeignKeys do
include CopHelper include CopHelper
let(:cop) { described_class.new } let(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/datetime' require_relative '../../../../rubocop/cop/migration/datetime'
RSpec.describe RuboCop::Cop::Migration::Datetime, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::Datetime do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/drop_table' require_relative '../../../../rubocop/cop/migration/drop_table'
RSpec.describe RuboCop::Cop::Migration::DropTable, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::DropTable do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/hash_index' require_relative '../../../../rubocop/cop/migration/hash_index'
RSpec.describe RuboCop::Cop::Migration::HashIndex, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::HashIndex do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/prevent_strings' require_relative '../../../../rubocop/cop/migration/prevent_strings'
RSpec.describe RuboCop::Cop::Migration::PreventStrings, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::PreventStrings do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/refer_to_index_by_name' require_relative '../../../../rubocop/cop/migration/refer_to_index_by_name'
RSpec.describe RuboCop::Cop::Migration::ReferToIndexByName, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::ReferToIndexByName do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/remove_column' require_relative '../../../../rubocop/cop/migration/remove_column'
RSpec.describe RuboCop::Cop::Migration::RemoveColumn, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::RemoveColumn do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/remove_concurrent_index' require_relative '../../../../rubocop/cop/migration/remove_concurrent_index'
RSpec.describe RuboCop::Cop::Migration::RemoveConcurrentIndex, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::RemoveConcurrentIndex do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/remove_index' require_relative '../../../../rubocop/cop/migration/remove_index'
RSpec.describe RuboCop::Cop::Migration::RemoveIndex, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::RemoveIndex do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/safer_boolean_column' require_relative '../../../../rubocop/cop/migration/safer_boolean_column'
RSpec.describe RuboCop::Cop::Migration::SaferBooleanColumn, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::SaferBooleanColumn do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/timestamps' require_relative '../../../../rubocop/cop/migration/timestamps'
RSpec.describe RuboCop::Cop::Migration::Timestamps, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::Timestamps do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/migration/update_column_in_batches' require_relative '../../../../rubocop/cop/migration/update_column_in_batches'
RSpec.describe RuboCop::Cop::Migration::UpdateColumnInBatches, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::UpdateColumnInBatches do
let(:cop) { described_class.new } let(:cop) { described_class.new }
let(:tmp_rails_root) { rails_root_join('tmp', 'rails_root') } let(:tmp_rails_root) { rails_root_join('tmp', 'rails_root') }
let(:migration_code) do let(:migration_code) do
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/with_lock_retries_disallowed_method' require_relative '../../../../rubocop/cop/migration/with_lock_retries_disallowed_method'
RSpec.describe RuboCop::Cop::Migration::WithLockRetriesDisallowedMethod, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::WithLockRetriesDisallowedMethod do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/migration/with_lock_retries_with_change' require_relative '../../../../rubocop/cop/migration/with_lock_retries_with_change'
RSpec.describe RuboCop::Cop::Migration::WithLockRetriesWithChange, type: :rubocop do RSpec.describe RuboCop::Cop::Migration::WithLockRetriesWithChange do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/performance/ar_count_each.rb' require_relative '../../../../rubocop/cop/performance/ar_count_each.rb'
RSpec.describe RuboCop::Cop::Performance::ARCountEach, type: :rubocop do RSpec.describe RuboCop::Cop::Performance::ARCountEach do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/performance/ar_exists_and_present_blank.rb' require_relative '../../../../rubocop/cop/performance/ar_exists_and_present_blank.rb'
RSpec.describe RuboCop::Cop::Performance::ARExistsAndPresentBlank, type: :rubocop do RSpec.describe RuboCop::Cop::Performance::ARExistsAndPresentBlank do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/performance/readlines_each' require_relative '../../../../rubocop/cop/performance/readlines_each'
RSpec.describe RuboCop::Cop::Performance::ReadlinesEach, type: :rubocop do RSpec.describe RuboCop::Cop::Performance::ReadlinesEach do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/prefer_class_methods_over_module' require_relative '../../../rubocop/cop/prefer_class_methods_over_module'
RSpec.describe RuboCop::Cop::PreferClassMethodsOverModule, type: :rubocop do RSpec.describe RuboCop::Cop::PreferClassMethodsOverModule do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/project_path_helper' require_relative '../../../rubocop/cop/project_path_helper'
RSpec.describe RuboCop::Cop::ProjectPathHelper, type: :rubocop do RSpec.describe RuboCop::Cop::ProjectPathHelper do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../rubocop/cop/put_group_routes_under_scope' require_relative '../../../rubocop/cop/put_group_routes_under_scope'
RSpec.describe RuboCop::Cop::PutGroupRoutesUnderScope, type: :rubocop do RSpec.describe RuboCop::Cop::PutGroupRoutesUnderScope do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../rubocop/cop/put_project_routes_under_scope' require_relative '../../../rubocop/cop/put_project_routes_under_scope'
RSpec.describe RuboCop::Cop::PutProjectRoutesUnderScope, type: :rubocop do RSpec.describe RuboCop::Cop::PutProjectRoutesUnderScope do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/qa/ambiguous_page_object_name' require_relative '../../../../rubocop/cop/qa/ambiguous_page_object_name'
RSpec.describe RuboCop::Cop::QA::AmbiguousPageObjectName, type: :rubocop do RSpec.describe RuboCop::Cop::QA::AmbiguousPageObjectName do
include CopHelper include CopHelper
let(:source_file) { 'qa/page.rb' } let(:source_file) { 'qa/page.rb' }
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/qa/element_with_pattern' require_relative '../../../../rubocop/cop/qa/element_with_pattern'
RSpec.describe RuboCop::Cop::QA::ElementWithPattern, type: :rubocop do RSpec.describe RuboCop::Cop::QA::ElementWithPattern do
include CopHelper include CopHelper
let(:source_file) { 'qa/page.rb' } let(:source_file) { 'qa/page.rb' }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require_relative '../../../../rubocop/cop/rspec/any_instance_of' require_relative '../../../../rubocop/cop/rspec/any_instance_of'
RSpec.describe RuboCop::Cop::RSpec::AnyInstanceOf, type: :rubocop do RSpec.describe RuboCop::Cop::RSpec::AnyInstanceOf do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/rspec/be_success_matcher' require_relative '../../../../rubocop/cop/rspec/be_success_matcher'
RSpec.describe RuboCop::Cop::RSpec::BeSuccessMatcher, type: :rubocop do RSpec.describe RuboCop::Cop::RSpec::BeSuccessMatcher do
include CopHelper include CopHelper
let(:source_file) { 'spec/foo_spec.rb' } let(:source_file) { 'spec/foo_spec.rb' }
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/rspec/env_assignment' require_relative '../../../../rubocop/cop/rspec/env_assignment'
RSpec.describe RuboCop::Cop::RSpec::EnvAssignment, type: :rubocop do RSpec.describe RuboCop::Cop::RSpec::EnvAssignment do
include CopHelper include CopHelper
offense_call_single_quotes_key = %(ENV['FOO'] = 'bar').freeze offense_call_single_quotes_key = %(ENV['FOO'] = 'bar').freeze
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/rspec/factories_in_migration_specs' require_relative '../../../../rubocop/cop/rspec/factories_in_migration_specs'
RSpec.describe RuboCop::Cop::RSpec::FactoriesInMigrationSpecs, type: :rubocop do RSpec.describe RuboCop::Cop::RSpec::FactoriesInMigrationSpecs do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -6,7 +6,7 @@ require 'rubocop' ...@@ -6,7 +6,7 @@ require 'rubocop'
require_relative '../../../../../rubocop/cop/rspec/factory_bot/inline_association' require_relative '../../../../../rubocop/cop/rspec/factory_bot/inline_association'
RSpec.describe RuboCop::Cop::RSpec::FactoryBot::InlineAssociation, type: :rubocop do RSpec.describe RuboCop::Cop::RSpec::FactoryBot::InlineAssociation do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require_relative '../../../../rubocop/cop/rspec/httparty_basic_auth' require_relative '../../../../rubocop/cop/rspec/httparty_basic_auth'
RSpec.describe RuboCop::Cop::RSpec::HTTPartyBasicAuth, type: :rubocop do RSpec.describe RuboCop::Cop::RSpec::HTTPartyBasicAuth do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/rspec/modify_sidekiq_middleware' require_relative '../../../../rubocop/cop/rspec/modify_sidekiq_middleware'
RSpec.describe RuboCop::Cop::RSpec::ModifySidekiqMiddleware, type: :rubocop do RSpec.describe RuboCop::Cop::RSpec::ModifySidekiqMiddleware do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/rspec/timecop_freeze' require_relative '../../../../rubocop/cop/rspec/timecop_freeze'
RSpec.describe RuboCop::Cop::RSpec::TimecopFreeze, type: :rubocop do RSpec.describe RuboCop::Cop::RSpec::TimecopFreeze do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/rspec/timecop_travel' require_relative '../../../../rubocop/cop/rspec/timecop_travel'
RSpec.describe RuboCop::Cop::RSpec::TimecopTravel, type: :rubocop do RSpec.describe RuboCop::Cop::RSpec::TimecopTravel do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/rspec/top_level_describe_path' require_relative '../../../../rubocop/cop/rspec/top_level_describe_path'
RSpec.describe RuboCop::Cop::RSpec::TopLevelDescribePath, type: :rubocop do RSpec.describe RuboCop::Cop::RSpec::TopLevelDescribePath do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -9,7 +9,7 @@ require_relative '../../../rubocop/cop/ruby_interpolation_in_translation' ...@@ -9,7 +9,7 @@ require_relative '../../../rubocop/cop/ruby_interpolation_in_translation'
# Disabling interpolation check as we deliberately want to have #{} in strings. # Disabling interpolation check as we deliberately want to have #{} in strings.
# rubocop:disable Lint/InterpolationCheck # rubocop:disable Lint/InterpolationCheck
RSpec.describe RuboCop::Cop::RubyInterpolationInTranslation, type: :rubocop do RSpec.describe RuboCop::Cop::RubyInterpolationInTranslation do
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
it 'does not add an offence for a regular messages' do it 'does not add an offence for a regular messages' do
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'rubocop/rspec/support' require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/safe_params' require_relative '../../../rubocop/cop/safe_params'
RSpec.describe RuboCop::Cop::SafeParams, type: :rubocop do RSpec.describe RuboCop::Cop::SafeParams do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/scalability/bulk_perform_with_context' require_relative '../../../../rubocop/cop/scalability/bulk_perform_with_context'
RSpec.describe RuboCop::Cop::Scalability::BulkPerformWithContext, type: :rubocop do RSpec.describe RuboCop::Cop::Scalability::BulkPerformWithContext do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/scalability/cron_worker_context' require_relative '../../../../rubocop/cop/scalability/cron_worker_context'
RSpec.describe RuboCop::Cop::Scalability::CronWorkerContext, type: :rubocop do RSpec.describe RuboCop::Cop::Scalability::CronWorkerContext do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/scalability/file_uploads' require_relative '../../../../rubocop/cop/scalability/file_uploads'
RSpec.describe RuboCop::Cop::Scalability::FileUploads, type: :rubocop do RSpec.describe RuboCop::Cop::Scalability::FileUploads do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -4,7 +4,7 @@ require 'fast_spec_helper' ...@@ -4,7 +4,7 @@ require 'fast_spec_helper'
require 'rubocop' require 'rubocop'
require_relative '../../../../rubocop/cop/scalability/idempotent_worker' require_relative '../../../../rubocop/cop/scalability/idempotent_worker'
RSpec.describe RuboCop::Cop::Scalability::IdempotentWorker, type: :rubocop do RSpec.describe RuboCop::Cop::Scalability::IdempotentWorker do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/sidekiq_options_queue' require_relative '../../../rubocop/cop/sidekiq_options_queue'
RSpec.describe RuboCop::Cop::SidekiqOptionsQueue, type: :rubocop do RSpec.describe RuboCop::Cop::SidekiqOptionsQueue do
include CopHelper include CopHelper
subject(:cop) { described_class.new } subject(:cop) { described_class.new }
......
...@@ -7,7 +7,7 @@ require 'rspec-parameterized' ...@@ -7,7 +7,7 @@ require 'rspec-parameterized'
require_relative '../../../rubocop/cop/static_translation_definition' require_relative '../../../rubocop/cop/static_translation_definition'
RSpec.describe RuboCop::Cop::StaticTranslationDefinition, type: :rubocop do RSpec.describe RuboCop::Cop::StaticTranslationDefinition do
include CopHelper include CopHelper
using RSpec::Parameterized::TableSyntax using RSpec::Parameterized::TableSyntax
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/usage_data/distinct_count_by_large_foreign_key' require_relative '../../../../rubocop/cop/usage_data/distinct_count_by_large_foreign_key'
RSpec.describe RuboCop::Cop::UsageData::DistinctCountByLargeForeignKey, type: :rubocop do RSpec.describe RuboCop::Cop::UsageData::DistinctCountByLargeForeignKey do
include CopHelper include CopHelper
let(:allowed_foreign_keys) { [:author_id, :user_id, :'merge_requests.target_project_id'] } let(:allowed_foreign_keys) { [:author_id, :user_id, :'merge_requests.target_project_id'] }
......
...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support' ...@@ -7,7 +7,7 @@ require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/usage_data/large_table' require_relative '../../../../rubocop/cop/usage_data/large_table'
RSpec.describe RuboCop::Cop::UsageData::LargeTable, type: :rubocop do RSpec.describe RuboCop::Cop::UsageData::LargeTable do
include CopHelper include CopHelper
let(:large_tables) { %i[Rails Time] } let(:large_tables) { %i[Rails Time] }
......
...@@ -5,7 +5,7 @@ require 'rubocop' ...@@ -5,7 +5,7 @@ require 'rubocop'
require 'parser/current' require 'parser/current'
require_relative '../../rubocop/qa_helpers' require_relative '../../rubocop/qa_helpers'
RSpec.describe RuboCop::QAHelpers, type: :rubocop do RSpec.describe RuboCop::QAHelpers do
def parse_source(source, path = 'foo.rb') def parse_source(source, path = 'foo.rb')
buffer = Parser::Source::Buffer.new(path) buffer = Parser::Source::Buffer.new(path)
buffer.source = source buffer.source = source
......
...@@ -25,4 +25,8 @@ RSpec.configure do |config| ...@@ -25,4 +25,8 @@ RSpec.configure do |config|
config.include FastRailsRoot config.include FastRailsRoot
config.include RuboCop::RSpec::ExpectOffense, type: :rubocop config.include RuboCop::RSpec::ExpectOffense, type: :rubocop
config.define_derived_metadata(file_path: %r{spec/rubocop}) do |metadata|
metadata[:type] = :rubocop
end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment