austin entrepreneur

Unit Testing!

Posted in Uncategorized by efalcao on October 19, 2007

I think I’ve officially become a fan of unit testing. Last night I was writing some code while trying out the upcoming rails 2.0 and decided to write some unit tests. I have been writing rails code as a hobby and then with Evenlevel for at least a year now and have always avoided the automated testing. No More!

Why I Avoided It:

In the beginning, because I was too busy the learning the rails core. Lately, because I felt like it was a waste of time.

Why I Was Wrong:

You’re gonna have to test anyway. I used to spent time in the rails console testing out my models. How stupid. I wrote 12 tests last night. It took less time than manually testing and now I have a small but sure-to-grow suite of tests to perform sanity checks in the future.

¬†What’s Next:

Gotta learn functional and integration testing now.

Tagged with: , ,