fixing spacing issues in README
This commit is contained in:
+2
-2
@@ -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.
|
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
|
user = User.new
|
||||||
ability = Ability.new(user)
|
ability = Ability.new(user)
|
||||||
assert ability.can?(:destroy, Project.new(:user => user))
|
assert ability.can?(:destroy, Project.new(:user => user))
|
||||||
assert ability.cannot?(:destroy, Project.new)
|
assert ability.cannot?(:destroy, Project.new)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
== Special Thanks
|
== Special Thanks
|
||||||
|
|||||||
Reference in New Issue
Block a user