Enabled RSpec/AnyInstance Rubocop on the common ecosystem
https://www.rubydoc.info/gems/rubocop-rspec/1.7.0/RuboCop/Cop/RSpec/AnyInstance
What are you trying to accomplish?
This pull request will enable the AnyInstance RSpec Rubocop rule specifically on files in the common folder. The scope of work had a large number of files, so breaking it up into chunks lets the work get done in smaller PRs for easier review and makes keeping the code base in sync much easier.
Anything you want to highlight for special attention from reviewers?
This is only part of the fix for the 'RSpec AnyInstanceOf ' rubocop issue.
How will you know you've accomplished your goal?
This has been tested to ensure that all of the rspec tests on the common folder still run.
Checklist
- [x] I have run the complete test suite to ensure all tests and linters pass.
- [x] I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
- [x] I have written clear and descriptive commit messages.
- [x] I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
- [x] I have ensured that the code is well-documented and easy to understand.
@GarryHurleyJr this is a fairly complex issue to resolve that requires refactoring the code being tested in order to address appropriately. It might be better left for someone with extensive Ruby experience in order to address the underlying problem that the rule is trying to address, rather than just attempting to make the error go away.
I've tried to leave some hints in collaboration with Copilot, on how this should be resolved inline, but feel free to just move on to the next issue if it's not entirely clear.
Closing, as Garry has moved on from the :dependabot: team. Whoever tackles this Rspec rule next will almost certainly start from a fresh PR.