rubocop / rubocop-capybara

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

Autocorrect for expect(current_path) moves method argument when parens are absent #37

Closed DanielHeath closed 1 year ago

DanielHeath commented 1 year ago

Code like expect(page.current_path).to eq(article_path article) gets autocorrected to

expect(page).to have_current_path(article_path article, ignore_query: true) The correct form is expect(page).to have_current_path article_path(article, ignore_query: true)

ydah commented 1 year ago

Thank you for your feedback! I have opened https://github.com/rubocop/rubocop-capybara/pull/39