Skip to content

Create allow_next_instance_of spec helper

Arturo Herrero requested to merge 25470-allow-any-instance-of into master

What does this MR do?

We already have expect_next_instance_of, but in some cases it's also useful to have a allow_next_instance_of.

I'm also implementing a RuboCop Cop to auto-correct automatically all the references that are able to be converted:

  • expect_any_instance_of -> expect_next_instance_of
  • allow_any_instance_of -> allow_next_instance_of

Closes #25470 (closed)

Merge request reports