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?
3 Answers
You might be looking for refute_includes
refute_includes array_of_user_ids, user.id
http://apidock.com/ruby/v1_9_3_392/MiniTest/Assertions/refute_includes