This ensures the InjectEnterpriseEditionModule cop is able to detect the
prepend patterns used in the qa/ directory. Previously it would not
detect them as all EE QA modules reside in QA::EE, and not the top-level
EE namespace.
This extends the InjectEnterpriseEditionModule RuboCop cop so that it
verifies the following:
1. The line number the injection occurs on (as before).
2. The method used (e.g. prepend instead of prepend_if_ee).
3. The argument type passed when using the new module injection methods.
The InjectEnterpriseEditionModule cop would not detect certain nested EE
constants such as `EE::Foo::Bar::Baz`. This could result in it not
enforcing `prepend` being placed on the last line. This commit fixes
this by just performing a string match on the line, instead of relying
on AST matching.
This Cop enforces the rule that injecting EE modules (using prepend,
include, or extend) is done by placing the injection on the last line of
a file, instead of somewhere in the middle. By placing these lines at
the very end, merge conflicts will not happen.