rubocop / rubocop-capybara

Code style checking for Capybara files.
https://docs.rubocop.org/rubocop-capybara
MIT License
40 stars 8 forks source link

Proposal for `Capybara/RSpec` department #47

Open ydah opened 1 year ago

ydah commented 1 year ago

The Capybara/SpecificMatcher, Capybara/NegationMatcher, and Capybara/VisibilityMatcher cops depend on methods from the Capybara::RSpecMatchers class.

https://www.rubydoc.info/gems/capybara/Capybara/RSpecMatchers

While these cops were previously implemented in the RuboCop RSpec gem and did not cause any issues, they may not be appropriate for RuboCop Capybara, which is not limited to RSpec extensions. Therefore, it might be a good to create a separate Capybara/RSpec department to handle these RSpec-specific extensions.

ydah commented 1 year ago

It might be a good to implement cops related to Capybara::Minitest::Assertions and Capybara::Minitest::Expectation as Capybara/Minitest department cops in a similar way to the proposed Capybara/RSpec department.