Skip to content

Files

Latest commit

 

History

History
24 lines (16 loc) · 413 Bytes

Minitest-RefutePredicate.md

File metadata and controls

24 lines (16 loc) · 413 Bytes

Pattern: Missing use of refute_predicate

Issue: -

Description

Enforces the test to use refute_predicate instead of using refute(obj.a_predicate_method?).

Examples

# bad
refute(obj.one?)
refute(obj.one?, 'message')

# good
refute_predicate(obj, :one?)
refute_predicate(obj, :one?, 'message')

Further Reading