diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /spec/rubocop_spec_helper.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'spec/rubocop_spec_helper.rb')
-rw-r--r-- | spec/rubocop_spec_helper.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/rubocop_spec_helper.rb b/spec/rubocop_spec_helper.rb new file mode 100644 index 00000000000..a37415a25de --- /dev/null +++ b/spec/rubocop_spec_helper.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +# All RuboCop specs may use fast_spec_helper. +require 'fast_spec_helper' + +# To prevent load order issues we need to require `rubocop` first. +# See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/47008 +require 'rubocop' +require 'rubocop/rspec/support' + +RSpec.configure do |config| + config.include RuboCop::RSpec::ExpectOffense, type: :rubocop + + config.define_derived_metadata(file_path: %r{spec/rubocop}) do |metadata| + metadata[:type] = :rubocop + end + + # Include config shared context for all cop specs. + config.include_context 'config', type: :rubocop +end |