diff options
Diffstat (limited to 'spec/rubocop/cop/rspec')
7 files changed, 11 insertions, 16 deletions
diff --git a/spec/rubocop/cop/rspec/any_instance_of_spec.rb b/spec/rubocop/cop/rspec/any_instance_of_spec.rb index b16f8ac189c..11c0f109850 100644 --- a/spec/rubocop/cop/rspec/any_instance_of_spec.rb +++ b/spec/rubocop/cop/rspec/any_instance_of_spec.rb @@ -1,10 +1,10 @@ # 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 +RSpec.describe RuboCop::Cop::RSpec::AnyInstanceOf, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/rspec/be_success_matcher_spec.rb b/spec/rubocop/cop/rspec/be_success_matcher_spec.rb index 12aa7d1643e..a16cd8b634f 100644 --- a/spec/rubocop/cop/rspec/be_success_matcher_spec.rb +++ b/spec/rubocop/cop/rspec/be_success_matcher_spec.rb @@ -1,10 +1,10 @@ # 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 +RSpec.describe RuboCop::Cop::RSpec::BeSuccessMatcher, type: :rubocop do include CopHelper let(:source_file) { 'spec/foo_spec.rb' } diff --git a/spec/rubocop/cop/rspec/env_assignment_spec.rb b/spec/rubocop/cop/rspec/env_assignment_spec.rb index 1c7cfb5c827..72ad584dd6f 100644 --- a/spec/rubocop/cop/rspec/env_assignment_spec.rb +++ b/spec/rubocop/cop/rspec/env_assignment_spec.rb @@ -1,13 +1,13 @@ # 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 +RSpec.describe RuboCop::Cop::RSpec::EnvAssignment, type: :rubocop do include CopHelper offense_call_single_quotes_key = %(ENV['FOO'] = 'bar').freeze diff --git a/spec/rubocop/cop/rspec/factories_in_migration_specs_spec.rb b/spec/rubocop/cop/rspec/factories_in_migration_specs_spec.rb index 20013519db4..1bb93402a5b 100644 --- a/spec/rubocop/cop/rspec/factories_in_migration_specs_spec.rb +++ b/spec/rubocop/cop/rspec/factories_in_migration_specs_spec.rb @@ -1,13 +1,13 @@ # 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 +RSpec.describe RuboCop::Cop::RSpec::FactoriesInMigrationSpecs, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/rspec/have_gitlab_http_status_spec.rb b/spec/rubocop/cop/rspec/have_gitlab_http_status_spec.rb index 4aa45e66ca7..f6040350dc0 100644 --- a/spec/rubocop/cop/rspec/have_gitlab_http_status_spec.rb +++ b/spec/rubocop/cop/rspec/have_gitlab_http_status_spec.rb @@ -8,7 +8,7 @@ require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/rspec/have_gitlab_http_status' -describe RuboCop::Cop::RSpec::HaveGitlabHttpStatus do +RSpec.describe RuboCop::Cop::RSpec::HaveGitlabHttpStatus do include CopHelper using RSpec::Parameterized::TableSyntax diff --git a/spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb b/spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb index d3d323b6643..ca47bba4264 100644 --- a/spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb +++ b/spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb @@ -4,9 +4,8 @@ require 'fast_spec_helper' require 'rubocop' require_relative '../../../../rubocop/cop/rspec/modify_sidekiq_middleware' -describe RuboCop::Cop::RSpec::ModifySidekiqMiddleware, type: :rubocop do +RSpec.describe RuboCop::Cop::RSpec::ModifySidekiqMiddleware, type: :rubocop do include CopHelper - include ExpectOffense subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/rspec/top_level_describe_path_spec.rb b/spec/rubocop/cop/rspec/top_level_describe_path_spec.rb index ee6b6d39cb4..92a76bde243 100644 --- a/spec/rubocop/cop/rspec/top_level_describe_path_spec.rb +++ b/spec/rubocop/cop/rspec/top_level_describe_path_spec.rb @@ -1,14 +1,10 @@ # frozen_string_literal: true require 'fast_spec_helper' - require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/rspec/top_level_describe_path' -describe RuboCop::Cop::RSpec::TopLevelDescribePath do - include RuboCop::RSpec::ExpectOffense +RSpec.describe RuboCop::Cop::RSpec::TopLevelDescribePath, type: :rubocop do include CopHelper subject(:cop) { described_class.new } |