Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 423 Bytes

Minitest-AssertPathExists.md

File metadata and controls

24 lines (16 loc) · 423 Bytes

Pattern: Missing use of assert_path_exists

Issue: -

Description

Enforces the test to use assert_path_exists instead of using assert(File.exist?(path)).

Examples

# bad
assert(File.exist?(path))
assert(File.exist?(path), 'message')

# good
assert_path_exists(path)
assert_path_exists(path, 'message')

Further Reading