What is the upside to testing in Ruby on Rails? I'm learning Rails and it seems like it's a waste of time to write code for something you could test yourself...
on 2008-11-30 10:25
on 2008-11-30 10:28
On Nov 30, 5:11 am, alex <geshwi...@gmail.com> wrote: > What is the upside to testing in Ruby on Rails? I'm learning Rails and > it seems like it's a waste of time to write code for something you > could test yourself... Will you automatically repeat all of your tests everytime you change the slightest bit of code? In my opinion automated unit tests are one of the most invaluable safeguards you can have. Fred
on 2008-11-30 12:01
alex wrote: > What is the upside to testing in Ruby on Rails? I'm learning Rails and > it seems like it's a waste of time to write code for something you > could test yourself... I can test all the important parts of my app in 21 seconds. That's less time that it usually takes me to test just one thing by hand. If I had to test all these features myself every time I made a change that *might* break something (which is pretty much every change), then I'd be spending 90% of my time clicking around in a web browser. Instead I spend just half my time in a test directory.
on 2008-11-30 12:23
Write tests, write code. Later: Write code, break tests. This is the part that saves your ass because if you're deploying WITHOUT tests you're probably thinking "MY APP IS BULLETPROOF" when actually it's "BULLET RIDDEN". So, if you have tests you'll see that something is FUBAR'd and you'll really want to fix that before deploying, therefore making you feel great that you're doing a little work to keep the world safe and your clients happy that their application is not broken. ----- Ryan Bigg Freelancer http://frozenplague.net