Testing documentation #6

ryanb opened this Issue Nov 17, 2009 · 1 comment

1 participant


I should add a bit of documentation about testing the CanCan ability model. One can use the can? method on this directly to check the abilities.

ability = Ability.new(some_user) # assuming I change to initialize instead of prepare method
assert ability.can?(:update, some_article)

Consider adding RSpec matchers for the can/cannot methods as well.


adding documentation for testing abilities - closed by df27653

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment