Skip to content

Files

Latest commit

 

History

History
35 lines (25 loc) · 452 Bytes

Capybara-RedundantWithinFind.md

File metadata and controls

35 lines (25 loc) · 452 Bytes

Pattern: Redundant within find(​)

Issue: -

Description

Checks for redundant within find(…​) calls.

Examples

# bad
within find('foo.bar') do
  # ...
end

# good
within 'foo.bar' do
  # ...
end

# bad
within find_by_id('foo') do
  # ...
end

# good
within '#foo' do
  # ...
end

Further Reading