Skip to content

RSpec: Use `type: :task` over `require 'rake_helper'`

Peter Leitzen requested to merge pl-spec-type-task into master

What does this MR do and why?

This MR deprecates spec/rake_helper in favor of RSpec's type: :task metadata tag which is either inferred by the spec location or defined explicitly.

It also removes all instances of require 'spec/rake_helper' and turns this very file into a no-op (emitting a warning to maintain master stability).

See self-review comments for even more details.

Closes #425039 (closed).

How to set up and validate locally

Run specs. Some highlights:

  • bin/rspec spec/tasks/rubocop_rake_spec.rb
  • bin/rspec spec/initializers/validate_database_config_spec.rb
  • bin/rspec spec/migrations/add_namespaces_emails_enabled_column_data_spec.rb

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Leitzen

Merge request reports