Ruby

Ruby

By DeepSource

Empty object shoud be asserted with assert_empty RB-W1016

Anti-pattern Autofix

Use assert_empty instead of using assert_equal([], object) or assert_equal({}, object) as it leaves less room for ambiguities or eventual false negatives in tests.

Bad practice

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

Recommended

assert_empty(object)

References

  1. Minitest#assert_equal - APIdock