What I am doing right now

I am having fun writing unit tests! On one level, this is weird. But on another, who wouldn't have fun writing the following test code?

	Role[:wizard].grant_permission_to! :hug, User
	@user.grant_role! :wizard
	@user.should be_able_to :hug, @another_user
	@user.should_not be_able_to :hug, @tiger

Wizards and tigers? That is awesome!


mattmatt reads from your letters

Leave a comment
Morbid Curiosity
What are you writing?
It does sound awesome :-)
Well, that is the thing. Because they're unit tests, the domain model is irrelevant, so I can do whatever I want with it because it's the LOGIC I'm testing.

(FWIW, it's a generalised permissions system. WIP.)