diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-23 00:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-23 00:08:42 +0300 |
commit | 2319d04d069d5e066e35cc44035239b21d3fae32 (patch) | |
tree | d2f1c2a61686714fb93f0e91828a703f3a5d28b7 /spec/rubocop | |
parent | 7105e0c53e2af43bda34e69155599c3a5af4cc13 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
30 files changed, 44 insertions, 108 deletions
diff --git a/spec/rubocop/cop/gitlab/duplicate_spec_location_spec.rb b/spec/rubocop/cop/gitlab/duplicate_spec_location_spec.rb index 3a0a74a4713..fb18045b390 100644 --- a/spec/rubocop/cop/gitlab/duplicate_spec_location_spec.rb +++ b/spec/rubocop/cop/gitlab/duplicate_spec_location_spec.rb @@ -2,12 +2,10 @@ require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/gitlab/duplicate_spec_location' -describe RuboCop::Cop::Gitlab::DuplicateSpecLocation do - include RuboCop::RSpec::ExpectOffense +describe RuboCop::Cop::Gitlab::DuplicateSpecLocation, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/graphql/authorize_types_spec.rb b/spec/rubocop/cop/graphql/authorize_types_spec.rb index 98797a780e0..ed3b9867a56 100644 --- a/spec/rubocop/cop/graphql/authorize_types_spec.rb +++ b/spec/rubocop/cop/graphql/authorize_types_spec.rb @@ -2,11 +2,10 @@ require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' + require_relative '../../../../rubocop/cop/graphql/authorize_types' -describe RuboCop::Cop::Graphql::AuthorizeTypes do - include RuboCop::RSpec::ExpectOffense +describe RuboCop::Cop::Graphql::AuthorizeTypes, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/graphql/descriptions_spec.rb b/spec/rubocop/cop/graphql/descriptions_spec.rb index 8cfdc05172d..245b0c17fb8 100644 --- a/spec/rubocop/cop/graphql/descriptions_spec.rb +++ b/spec/rubocop/cop/graphql/descriptions_spec.rb @@ -2,11 +2,9 @@ require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' require_relative '../../../../rubocop/cop/graphql/descriptions' -describe RuboCop::Cop::Graphql::Descriptions do - include RuboCop::RSpec::ExpectOffense +describe RuboCop::Cop::Graphql::Descriptions, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_column_with_default_spec.rb b/spec/rubocop/cop/migration/add_column_with_default_spec.rb index 5d4fc59fb95..3427dd57ceb 100644 --- a/spec/rubocop/cop/migration/add_column_with_default_spec.rb +++ b/spec/rubocop/cop/migration/add_column_with_default_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/add_column_with_default' -describe RuboCop::Cop::Migration::AddColumnWithDefault do +describe RuboCop::Cop::Migration::AddColumnWithDefault, type: :rubocop do include CopHelper let(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_columns_to_wide_tables_spec.rb b/spec/rubocop/cop/migration/add_columns_to_wide_tables_spec.rb index 5b179168eab..b626e79cb9d 100644 --- a/spec/rubocop/cop/migration/add_columns_to_wide_tables_spec.rb +++ b/spec/rubocop/cop/migration/add_columns_to_wide_tables_spec.rb @@ -1,11 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' +require 'fast_spec_helper' require 'rubocop' - require_relative '../../../../rubocop/cop/migration/add_columns_to_wide_tables' -describe RuboCop::Cop::Migration::AddColumnsToWideTables do +describe RuboCop::Cop::Migration::AddColumnsToWideTables, type: :rubocop do include CopHelper let(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb b/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb index dfc3898af24..efb4869ee93 100644 --- a/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb +++ b/spec/rubocop/cop/migration/add_concurrent_foreign_key_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/add_concurrent_foreign_key' -describe RuboCop::Cop::Migration::AddConcurrentForeignKey do +describe RuboCop::Cop::Migration::AddConcurrentForeignKey, type: :rubocop do include CopHelper let(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_concurrent_index_spec.rb b/spec/rubocop/cop/migration/add_concurrent_index_spec.rb index 9812e64216f..b08070d679e 100644 --- a/spec/rubocop/cop/migration/add_concurrent_index_spec.rb +++ b/spec/rubocop/cop/migration/add_concurrent_index_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/add_concurrent_index' -describe RuboCop::Cop::Migration::AddConcurrentIndex do +describe RuboCop::Cop::Migration::AddConcurrentIndex, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_index_spec.rb b/spec/rubocop/cop/migration/add_index_spec.rb index ca1aadb381b..6be2a019fc2 100644 --- a/spec/rubocop/cop/migration/add_index_spec.rb +++ b/spec/rubocop/cop/migration/add_index_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/add_index' -describe RuboCop::Cop::Migration::AddIndex do +describe RuboCop::Cop::Migration::AddIndex, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb b/spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb index 39ca9ace73d..888f9aa6259 100644 --- a/spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb +++ b/spec/rubocop/cop/migration/add_limit_to_text_columns_spec.rb @@ -1,12 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/add_limit_to_text_columns' -describe RuboCop::Cop::Migration::AddLimitToTextColumns do +describe RuboCop::Cop::Migration::AddLimitToTextColumns, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_reference_spec.rb b/spec/rubocop/cop/migration/add_reference_spec.rb index 03348ecc744..1bc67820396 100644 --- a/spec/rubocop/cop/migration/add_reference_spec.rb +++ b/spec/rubocop/cop/migration/add_reference_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/add_reference' -describe RuboCop::Cop::Migration::AddReference do +describe RuboCop::Cop::Migration::AddReference, type: :rubocop do include CopHelper let(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/add_timestamps_spec.rb b/spec/rubocop/cop/migration/add_timestamps_spec.rb index a3314d878e5..da4b7d91a57 100644 --- a/spec/rubocop/cop/migration/add_timestamps_spec.rb +++ b/spec/rubocop/cop/migration/add_timestamps_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/add_timestamps' -describe RuboCop::Cop::Migration::AddTimestamps do +describe RuboCop::Cop::Migration::AddTimestamps, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/datetime_spec.rb b/spec/rubocop/cop/migration/datetime_spec.rb index e3023406dce..98ce8ec0666 100644 --- a/spec/rubocop/cop/migration/datetime_spec.rb +++ b/spec/rubocop/cop/migration/datetime_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/datetime' -describe RuboCop::Cop::Migration::Datetime do +describe RuboCop::Cop::Migration::Datetime, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/hash_index_spec.rb b/spec/rubocop/cop/migration/hash_index_spec.rb index e8b05a94653..917556a446b 100644 --- a/spec/rubocop/cop/migration/hash_index_spec.rb +++ b/spec/rubocop/cop/migration/hash_index_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/hash_index' -describe RuboCop::Cop::Migration::HashIndex do +describe RuboCop::Cop::Migration::HashIndex, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/prevent_strings_spec.rb b/spec/rubocop/cop/migration/prevent_strings_spec.rb index d0e97874aed..bcb845cde9d 100644 --- a/spec/rubocop/cop/migration/prevent_strings_spec.rb +++ b/spec/rubocop/cop/migration/prevent_strings_spec.rb @@ -1,12 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/prevent_strings' -describe RuboCop::Cop::Migration::PreventStrings do +describe RuboCop::Cop::Migration::PreventStrings, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/remove_column_spec.rb b/spec/rubocop/cop/migration/remove_column_spec.rb index bc2fa04ce64..ea9ce89431f 100644 --- a/spec/rubocop/cop/migration/remove_column_spec.rb +++ b/spec/rubocop/cop/migration/remove_column_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/remove_column' -describe RuboCop::Cop::Migration::RemoveColumn do +describe RuboCop::Cop::Migration::RemoveColumn, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/remove_concurrent_index_spec.rb b/spec/rubocop/cop/migration/remove_concurrent_index_spec.rb index 9de4c756f12..5a71d72be46 100644 --- a/spec/rubocop/cop/migration/remove_concurrent_index_spec.rb +++ b/spec/rubocop/cop/migration/remove_concurrent_index_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/remove_concurrent_index' -describe RuboCop::Cop::Migration::RemoveConcurrentIndex do +describe RuboCop::Cop::Migration::RemoveConcurrentIndex, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/remove_index_spec.rb b/spec/rubocop/cop/migration/remove_index_spec.rb index d343d27484a..852ff563665 100644 --- a/spec/rubocop/cop/migration/remove_index_spec.rb +++ b/spec/rubocop/cop/migration/remove_index_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/remove_index' -describe RuboCop::Cop::Migration::RemoveIndex do +describe RuboCop::Cop::Migration::RemoveIndex, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/safer_boolean_column_spec.rb b/spec/rubocop/cop/migration/safer_boolean_column_spec.rb index b27a4cd4f80..8c78bbba490 100644 --- a/spec/rubocop/cop/migration/safer_boolean_column_spec.rb +++ b/spec/rubocop/cop/migration/safer_boolean_column_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/safer_boolean_column' -describe RuboCop::Cop::Migration::SaferBooleanColumn do +describe RuboCop::Cop::Migration::SaferBooleanColumn, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/timestamps_spec.rb b/spec/rubocop/cop/migration/timestamps_spec.rb index d03c75e7cfc..866e922686f 100644 --- a/spec/rubocop/cop/migration/timestamps_spec.rb +++ b/spec/rubocop/cop/migration/timestamps_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/timestamps' -describe RuboCop::Cop::Migration::Timestamps do +describe RuboCop::Cop::Migration::Timestamps, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/with_lock_retries_disallowed_method_spec.rb b/spec/rubocop/cop/migration/with_lock_retries_disallowed_method_spec.rb index 48570c1c8d8..acb583475be 100644 --- a/spec/rubocop/cop/migration/with_lock_retries_disallowed_method_spec.rb +++ b/spec/rubocop/cop/migration/with_lock_retries_disallowed_method_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/with_lock_retries_disallowed_method' -describe RuboCop::Cop::Migration::WithLockRetriesDisallowedMethod do +describe RuboCop::Cop::Migration::WithLockRetriesDisallowedMethod, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/migration/with_lock_retries_with_change_spec.rb b/spec/rubocop/cop/migration/with_lock_retries_with_change_spec.rb index 75a1f939a9f..38fe1f510c4 100644 --- a/spec/rubocop/cop/migration/with_lock_retries_with_change_spec.rb +++ b/spec/rubocop/cop/migration/with_lock_retries_with_change_spec.rb @@ -1,13 +1,10 @@ # frozen_string_literal: true -require 'spec_helper' - +require 'fast_spec_helper' require 'rubocop' -require 'rubocop/rspec/support' - require_relative '../../../../rubocop/cop/migration/with_lock_retries_with_change' -describe RuboCop::Cop::Migration::WithLockRetriesWithChange do +describe RuboCop::Cop::Migration::WithLockRetriesWithChange, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/performance/ar_count_each_spec.rb b/spec/rubocop/cop/performance/ar_count_each_spec.rb index 534fa55dd45..2bcc6f4cfd6 100644 --- a/spec/rubocop/cop/performance/ar_count_each_spec.rb +++ b/spec/rubocop/cop/performance/ar_count_each_spec.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true require 'fast_spec_helper' +require 'rubocop' require_relative '../../../../rubocop/cop/performance/ar_count_each.rb' describe RuboCop::Cop::Performance::ARCountEach, type: :rubocop do include CopHelper - include ExpectOffense subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/performance/ar_exists_and_present_blank_spec.rb b/spec/rubocop/cop/performance/ar_exists_and_present_blank_spec.rb index da44004f947..b0c260df733 100644 --- a/spec/rubocop/cop/performance/ar_exists_and_present_blank_spec.rb +++ b/spec/rubocop/cop/performance/ar_exists_and_present_blank_spec.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true require 'fast_spec_helper' +require 'rubocop' require_relative '../../../../rubocop/cop/performance/ar_exists_and_present_blank.rb' describe RuboCop::Cop::Performance::ARExistsAndPresentBlank, type: :rubocop do include CopHelper - include ExpectOffense subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/performance/readlines_each_spec.rb b/spec/rubocop/cop/performance/readlines_each_spec.rb index e71aaaf3056..aee098b80eb 100644 --- a/spec/rubocop/cop/performance/readlines_each_spec.rb +++ b/spec/rubocop/cop/performance/readlines_each_spec.rb @@ -1,11 +1,11 @@ # frozen_string_literal: true require 'fast_spec_helper' +require 'rubocop' require_relative '../../../../rubocop/cop/performance/readlines_each' describe RuboCop::Cop::Performance::ReadlinesEach, type: :rubocop do include CopHelper - include ExpectOffense subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb b/spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb index d3d323b6643..670c70889f2 100644 --- a/spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb +++ b/spec/rubocop/cop/rspec/modify_sidekiq_middleware_spec.rb @@ -6,7 +6,6 @@ require_relative '../../../../rubocop/cop/rspec/modify_sidekiq_middleware' 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..f03b75ecc73 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 +describe RuboCop::Cop::RSpec::TopLevelDescribePath, type: :rubocop do include CopHelper subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb b/spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb index 61603d0100e..5c333aea5cf 100644 --- a/spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb +++ b/spec/rubocop/cop/scalability/bulk_perform_with_context_spec.rb @@ -6,7 +6,6 @@ require_relative '../../../../rubocop/cop/scalability/bulk_perform_with_context' describe RuboCop::Cop::Scalability::BulkPerformWithContext, type: :rubocop do include CopHelper - include ExpectOffense subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/scalability/cron_worker_context_spec.rb b/spec/rubocop/cop/scalability/cron_worker_context_spec.rb index e917d33b1e5..3add0a44ba4 100644 --- a/spec/rubocop/cop/scalability/cron_worker_context_spec.rb +++ b/spec/rubocop/cop/scalability/cron_worker_context_spec.rb @@ -6,7 +6,6 @@ require_relative '../../../../rubocop/cop/scalability/cron_worker_context' describe RuboCop::Cop::Scalability::CronWorkerContext, type: :rubocop do include CopHelper - include ExpectOffense subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/scalability/file_uploads_spec.rb b/spec/rubocop/cop/scalability/file_uploads_spec.rb index b0be9ac2b51..d3102b2a961 100644 --- a/spec/rubocop/cop/scalability/file_uploads_spec.rb +++ b/spec/rubocop/cop/scalability/file_uploads_spec.rb @@ -6,7 +6,6 @@ require_relative '../../../../rubocop/cop/scalability/file_uploads' describe RuboCop::Cop::Scalability::FileUploads, type: :rubocop do include CopHelper - include ExpectOffense subject(:cop) { described_class.new } diff --git a/spec/rubocop/cop/scalability/idempotent_worker_spec.rb b/spec/rubocop/cop/scalability/idempotent_worker_spec.rb index 73cacc984e9..97b1886310a 100644 --- a/spec/rubocop/cop/scalability/idempotent_worker_spec.rb +++ b/spec/rubocop/cop/scalability/idempotent_worker_spec.rb @@ -6,7 +6,6 @@ require_relative '../../../../rubocop/cop/scalability/idempotent_worker' describe RuboCop::Cop::Scalability::IdempotentWorker, type: :rubocop do include CopHelper - include ExpectOffense subject(:cop) { described_class.new } |