Skip to content

Files

Latest commit

 

History

History
25 lines (16 loc) · 467 Bytes

Minitest-RefuteSame.md

File metadata and controls

25 lines (16 loc) · 467 Bytes

Pattern: Missing use of refute_same(expected, object)

Issue: -

Description

Enforces the use of refute_same(expected, object) over refute(expected.equal?(actual)).

Use refute_same only when there is a need to compare by identity. Otherwise, use refute_equal.

Examples

# bad
refute(expected.equal?(actual))

# good
refute_same(expected, actual)

Further Reading