Skip to content

Update RSpec helper methods to *_next_instance_of

Arturo Herrero requested to merge rspec-next-instance-of into master

What does this MR do?

We have a Rubocop cop to auto-correct automatically all the references in RSpec as:

  • expect_any_instance_of -> expect_next_instance_of
  • allow_any_instance_of -> allow_next_instance_of

https://docs.gitlab.com/ee/development/gotchas.html#avoid-using-expect_any_instance_of-or-allow_any_instance_of-in-rspec

At the moment, the cop is disabled because I'm correcting all the current offenses in different merge requests before we can enable it. I'm creating small merge requests to iterate quickly.

Related to #34997 (closed)

Merge request reports

Loading