Behold, the power of testing.

So I was working on my little project web application and thought I'd try applying "attr_protected" to one of the fields of my Item model. It's used to keep fields you don't want users to be able to change from being changed unless you go directly through the model. After making the change, I ran my unit tests again and found that they now failed ( all tests passed last time I was working on this project ). I thought to myself
ooo, if this were in production or something, applying attr_protected could have broken something and made people sad, but since I had a test that failed because of the change, I was aware of the potential breakage before I would have put this up to the public.
Not that what I'm working on really matters for much, but it's good to know I did something useful.

No comments: