Skip to content

Files

Latest commit

 

History

History
19 lines (13 loc) · 316 Bytes

Minitest-AssertEmptyLiteral.md

File metadata and controls

19 lines (13 loc) · 316 Bytes

Pattern: Missing use of assert_empty for literal

Issue: -

Description

Enforces the test to use assert_empty instead of using assert_equal([], object) or assert_equal({}, object).

Examples

# bad
assert_equal([], object)
assert_equal({}, object)

# good
assert_empty(object)