We have an assertion in rails tests assert_in_array that is used to check if an element exists in an array. Is there any reverse assertion for it like assert_not_in_array?
There is no such assertion, however you could do this:
assert (not array.include? element)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With