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: , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: