?

Log in

Previous Entry | Next Entry

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!

Tags:

Comments

mattmatt
Nov. 4th, 2008 09:29 am (UTC)
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.)

Latest Month

August 2009
S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Consumption

Tags

Page Summary

Powered by LiveJournal.com
Designed by Lilia Ahner