n many branching possibilities. Since CanCanCan handles all permission logic in <code>Ability</code> classes this makes it easy to have a solid set of unit test for complete coverage.</p><p>The <code>can?</code> method can be called directly on any <code>Ability</code> (like you would in the controller or view) so it is easy to test permission logic.</p><div class="language-ruby vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ruby</span><pre class="shiki shiki-themes gi