Skip to content

Commit

Permalink
Merge pull request #64 from rubocop/fix-invalid-document
Browse files Browse the repository at this point in the history
Fix an errors in `Capybara/SpecificFinders` documentation
  • Loading branch information
ydah authored Sep 3, 2023
2 parents abb78b6 + 708dbc6 commit e68cf12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions docs/modules/ROOT/pages/cops_capybara.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,10 @@ Checks if there is a more specific finder offered by Capybara.
----
# bad
find('#some-id')
find('[visible][id=some-id]')
find('[id=some-id]')
# good
find_by_id('some-id')
find_by_id('some-id', visible: true)
----

=== References
Expand Down
3 changes: 1 addition & 2 deletions lib/rubocop/cop/capybara/specific_finders.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ module Capybara
# @example
# # bad
# find('#some-id')
# find('[visible][id=some-id]')
# find('[id=some-id]')
#
# # good
# find_by_id('some-id')
# find_by_id('some-id', visible: true)
#
class SpecificFinders < ::RuboCop::Cop::Base
extend AutoCorrector
Expand Down

0 comments on commit e68cf12

Please sign in to comment.