rspec/rules/S3981/description.adoc

2 lines
386 B
Plaintext
Raw Normal View History

2021-01-27 13:42:22 +01:00
The size of a collection and the length of an array are always greater than or equal to zero. So testing that a size or length is greater than or equal to zero doesn't make sense, since the result is always ``++true++``. Similarly testing that it is less than zero will always return ``++false++``. Perhaps the intent was to check the non-emptiness of the collection or array instead.