Skip to content

Files

Latest commit

 

History

History
24 lines (16 loc) · 379 Bytes

Capybara-FindAllFirst.md

File metadata and controls

24 lines (16 loc) · 379 Bytes

Pattern: Missing use of first

Issue: -

Description

Enforces use of first instead of all with first or [0].

Examples

# bad
all('a').first
all('a')[0]
find('a', match: :first)
all('a', match: :first)

# good
first('a')

Further Reading