Ruby on Rails testing

0 views
Skip to first unread message

alex

unread,
Nov 30, 2008, 12:11:03 AM11/30/08
to Ruby on Rails: Talk
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...

Frederick Cheung

unread,
Nov 30, 2008, 4:28:14 AM11/30/08
to Ruby on Rails: Talk
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

Pau Cor

unread,
Nov 30, 2008, 6:01:31 AM11/30/08
to rubyonra...@googlegroups.com

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.
--
Posted via http://www.ruby-forum.com/.

Ryan Bigg

unread,
Nov 30, 2008, 6:23:51 AM11/30/08
to rubyonra...@googlegroups.com
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

Reply all
Reply to author
Forward
0 new messages