Skip to content

Enforce RSpec zero monkey patching mode under EE

Arturo Herrero requested to merge 220018-rspec-zero-monkey-patching-mode-ee into master

What does this MR do?

The plan for RSpec 4.0 is to disable monkey patching, reference:

This commit stops using RSpec monkey patching in several spec files and enforces it under the EE directory. It will raise a method missing error to prevent keep monkey patching the ee/spec directory.

This is part of a series of merge requests until we are able to configure RSpec for the spec directory.

It's difficult to review this but a nice way could be to checkout the branch locally and grep filter for changes differences from:

- describe
+ RSpec.describe
- shared_examples
+ RSpec.shared_examples
- shared_context
+ RSpec.shared_context

Something like this:

git diff HEAD^ | grep '^[+-][A-z\w]' | egrep -vE '\-describe|\+RSpec.describe|\-shared_examples|\+RSpec.shared_examples|\-shared_context|\+RSpec.shared_context'

Related to #220018 (closed)

Merge request reports