Loading
Recommend policy helpers in permission specs
What does this MR do?
Adds a section to the permissions testing guidelines that recommends expect_allowed and expect_disallowed over be_allowed and be_disallowed.
The helpers check each permission on its own and report every failure with the policy debug output. be_allowed(:a, :b) passes only if all of them pass, and a failure does not say which one broke.
The "bad" example in the describe section now uses expect_allowed. That way it shows only the grouping problem.
Related issues
Related to #633481 (closed)