I am writing an app where it is desirable to check if a view does not have some functionality – in particular because that functionality must be presented only to users in certain security group. I am looking for the opposite of assert_selects in order to see that a menu is not rendered.
Share
Take a look at the docs here:
http://apidock.com/rails/ActionController/Assertions/SelectorAssertions/assert_select
From the docs:
assert_select is an
assertion that selects elements and makes one or more equality tests.and from the equality tests sections:
And a simple example: