Skip to content

Commit

Permalink
Fix example code in the SpecificMatcher cop
Browse files Browse the repository at this point in the history
  • Loading branch information
boris-petrov committed Jun 3, 2024
1 parent 4466a22 commit dd13347
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/cops_capybara.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ expect(page).to have_button
expect(page).to have_no_link('foo', class: 'cls', href: 'http://example.com')
expect(page).to have_table(class: 'cls')
expect(page).to have_select
expect(page).to have_field('foo')
expect(page).to have_field(with: 'foo')
----
=== References
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/cop/capybara/specific_matcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module Capybara
# expect(page).to have_no_link('foo', class: 'cls', href: 'http://example.com')
# expect(page).to have_table(class: 'cls')
# expect(page).to have_select
# expect(page).to have_field('foo')
# expect(page).to have_field(with: 'foo')
#
class SpecificMatcher < ::RuboCop::Cop::Base
MSG = 'Prefer `%<good_matcher>s` over `%<bad_matcher>s`.'
Expand Down

0 comments on commit dd13347

Please sign in to comment.