Commit f2a49133 authored by James Fargher's avatar James Fargher

Merge branch 'convert_rubocop_spec_to_fast_spec_helper' into 'master'

Convert most of Rubocop specs to fast_spec_helper

See merge request gitlab-org/gitlab!34595
parents cb0bfc12 bc19865e
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../rubocop/cop/active_record_association_reload'
describe RuboCop::Cop::ActiveRecordAssociationReload do
describe RuboCop::Cop::ActiveRecordAssociationReload, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/avoid_keyword_arguments_in_sidekiq_workers'
describe RuboCop::Cop::AvoidKeywordArgumentsInSidekiqWorkers do
describe RuboCop::Cop::AvoidKeywordArgumentsInSidekiqWorkers, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../rubocop/cop/avoid_route_redirect_leading_slash'
describe RuboCop::Cop::AvoidRouteRedirectLeadingSlash do
describe RuboCop::Cop::AvoidRouteRedirectLeadingSlash, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/ban_catch_throw'
describe RuboCop::Cop::BanCatchThrow do
describe RuboCop::Cop::BanCatchThrow, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/finder'
describe RuboCop::Cop::CodeReuse::Finder do
describe RuboCop::Cop::CodeReuse::Finder, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/presenter'
describe RuboCop::Cop::CodeReuse::Presenter do
describe RuboCop::Cop::CodeReuse::Presenter, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/serializer'
describe RuboCop::Cop::CodeReuse::Serializer do
describe RuboCop::Cop::CodeReuse::Serializer, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/service_class'
describe RuboCop::Cop::CodeReuse::ServiceClass do
describe RuboCop::Cop::CodeReuse::ServiceClass, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/code_reuse/worker'
describe RuboCop::Cop::CodeReuse::Worker do
describe RuboCop::Cop::CodeReuse::Worker, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/default_scope'
describe RuboCop::Cop::DefaultScope do
describe RuboCop::Cop::DefaultScope, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/destroy_all'
describe RuboCop::Cop::DestroyAll do
describe RuboCop::Cop::DestroyAll, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/bulk_insert'
describe RuboCop::Cop::Gitlab::BulkInsert do
describe RuboCop::Cop::Gitlab::BulkInsert, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/change_timzone'
describe RuboCop::Cop::Gitlab::ChangeTimezone do
describe RuboCop::Cop::Gitlab::ChangeTimezone, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/const_get_inherit_false'
describe RuboCop::Cop::Gitlab::ConstGetInheritFalse do
describe RuboCop::Cop::Gitlab::ConstGetInheritFalse, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/finder_with_find_by'
describe RuboCop::Cop::Gitlab::FinderWithFindBy do
describe RuboCop::Cop::Gitlab::FinderWithFindBy, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/httparty'
describe RuboCop::Cop::Gitlab::HTTParty do # rubocop:disable RSpec/FilePath
describe RuboCop::Cop::Gitlab::HTTParty, type: :rubocop do # rubocop:disable RSpec/FilePath
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/json'
describe RuboCop::Cop::Gitlab::Json do
describe RuboCop::Cop::Gitlab::Json, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/module_with_instance_variables'
describe RuboCop::Cop::Gitlab::ModuleWithInstanceVariables do
describe RuboCop::Cop::Gitlab::ModuleWithInstanceVariables, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/predicate_memoization'
describe RuboCop::Cop::Gitlab::PredicateMemoization do
describe RuboCop::Cop::Gitlab::PredicateMemoization, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/rails_logger'
describe RuboCop::Cop::Gitlab::RailsLogger do
describe RuboCop::Cop::Gitlab::RailsLogger, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/union'
describe RuboCop::Cop::Gitlab::Union do
describe RuboCop::Cop::Gitlab::Union, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/group_public_or_visible_to_user'
describe RuboCop::Cop::GroupPublicOrVisibleToUser do
describe RuboCop::Cop::GroupPublicOrVisibleToUser, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/ignored_columns'
describe RuboCop::Cop::IgnoredColumns do
describe RuboCop::Cop::IgnoredColumns, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/include_sidekiq_worker'
describe RuboCop::Cop::IncludeSidekiqWorker do
describe RuboCop::Cop::IncludeSidekiqWorker, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/inject_enterprise_edition_module'
describe RuboCop::Cop::InjectEnterpriseEditionModule do
describe RuboCop::Cop::InjectEnterpriseEditionModule, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/line_break_around_conditional_block'
describe RuboCop::Cop::LineBreakAroundConditionalBlock do
describe RuboCop::Cop::LineBreakAroundConditionalBlock, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/prefer_class_methods_over_module'
describe RuboCop::Cop::PreferClassMethodsOverModule do
describe RuboCop::Cop::PreferClassMethodsOverModule, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/project_path_helper'
describe RuboCop::Cop::ProjectPathHelper do
describe RuboCop::Cop::ProjectPathHelper, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../rubocop/cop/put_group_routes_under_scope'
describe RuboCop::Cop::PutGroupRoutesUnderScope do
describe RuboCop::Cop::PutGroupRoutesUnderScope, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require_relative '../../../rubocop/cop/put_project_routes_under_scope'
describe RuboCop::Cop::PutProjectRoutesUnderScope do
describe RuboCop::Cop::PutProjectRoutesUnderScope, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/qa/ambiguous_page_object_name'
describe RuboCop::Cop::QA::AmbiguousPageObjectName do
describe RuboCop::Cop::QA::AmbiguousPageObjectName, type: :rubocop do
include CopHelper
let(:source_file) { 'qa/page.rb' }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/qa/element_with_pattern'
describe RuboCop::Cop::QA::ElementWithPattern do
describe RuboCop::Cop::QA::ElementWithPattern, type: :rubocop do
include CopHelper
let(:source_file) { 'qa/page.rb' }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require_relative '../../../../rubocop/cop/rspec/any_instance_of'
describe RuboCop::Cop::RSpec::AnyInstanceOf do
describe RuboCop::Cop::RSpec::AnyInstanceOf, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require_relative '../../../../rubocop/cop/rspec/be_success_matcher'
describe RuboCop::Cop::RSpec::BeSuccessMatcher do
describe RuboCop::Cop::RSpec::BeSuccessMatcher, type: :rubocop do
include CopHelper
let(:source_file) { 'spec/foo_spec.rb' }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/rspec/env_assignment'
describe RuboCop::Cop::RSpec::EnvAssignment do
describe RuboCop::Cop::RSpec::EnvAssignment, type: :rubocop do
include CopHelper
offense_call_single_quotes_key = %(ENV['FOO'] = 'bar').freeze
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/rspec/factories_in_migration_specs'
describe RuboCop::Cop::RSpec::FactoriesInMigrationSpecs do
describe RuboCop::Cop::RSpec::FactoriesInMigrationSpecs, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
......@@ -9,7 +9,7 @@ require_relative '../../../rubocop/cop/ruby_interpolation_in_translation'
# Disabling interpolation check as we deliberately want to have #{} in strings.
# rubocop:disable Lint/InterpolationCheck
describe RuboCop::Cop::RubyInterpolationInTranslation do
describe RuboCop::Cop::RubyInterpolationInTranslation, type: :rubocop do
subject(:cop) { described_class.new }
it 'does not add an offence for a regular messages' do
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/safe_params'
describe RuboCop::Cop::SafeParams do
describe RuboCop::Cop::SafeParams, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
# frozen_string_literal: true
require 'spec_helper'
require 'fast_spec_helper'
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../rubocop/cop/sidekiq_options_queue'
describe RuboCop::Cop::SidekiqOptionsQueue do
describe RuboCop::Cop::SidekiqOptionsQueue, type: :rubocop do
include CopHelper
subject(:cop) { described_class.new }
......
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