fixing spacing issues in README
This commit is contained in:
parent
52649a8da1
commit
072cb0f2de
|
@ -209,12 +209,12 @@ The actual details will depend largely on your application requirements, but hop
|
|||
|
||||
It is very easy to test the Ability model since you can call "can?" directly on it as you would in the view or controller.
|
||||
|
||||
def test "user can only destroy projects which he owns"
|
||||
def test "user can only destroy projects which he owns"
|
||||
user = User.new
|
||||
ability = Ability.new(user)
|
||||
assert ability.can?(:destroy, Project.new(:user => user))
|
||||
assert ability.cannot?(:destroy, Project.new)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
== Special Thanks
|
||||
|
|
Loading…
Reference in New Issue
Block a user