Skip to content

Files

Latest commit

 

History

History
22 lines (14 loc) · 368 Bytes

RSpec-BeEmpty.md

File metadata and controls

22 lines (14 loc) · 368 Bytes

Pattern: Missing use of be_empty

Issue: -

Description

Prefer using be_empty when checking for an empty array.

Examples

# bad
expect(array).to contain_exactly
expect(array).to match_array([])

# good
expect(array).to be_empty

Further Reading