Forum: Ruby on Rails RE: The Guilt List

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Hogan, Brian P. (Guest)
on 2006-01-12 22:42
(Received via mailing list)
I just started doing unit tests on my current application because I felt
bad :) I'll figure out functional tests on the next app :)
matthew clark (Guest)
on 2006-01-12 22:51
(Received via mailing list)
The only guilt I feel in my rails aps is that I now have the time to do
things right, including tests, and can bill for the whole thing.  With
used to take short cuts and cheat here and there because that is what
clients expected.  They wanted something to work in the shortest amount
time possible.

Clients still want that, but with Rails, I can indulge in the guilty
pleasure of testing first, and still get the job done ahead of schedule.

The truth be told, test driven development is actually faster than code
reload, so I'm not sure if it is Rails, Tests, or both that have allowed
my guilty pleasure.  But I'll give credit to Rails because it makes
so blasted easy.

M Daggett (Guest)
on 2006-01-12 22:54
(Received via mailing list)
Actually, this is one of the problems with the concept of 'testing'
which implies that the functionality is completed and therefore just
needs verification that it works as programmed. However, testing for
is not about finding the gaps in my program it is able fleshing out
the requirements of the design in a flexible forgiving structure. Good
testing is about testing assumptions of the domain model as much as it
is about testing the technical implementations. As an example, try
this exercise with a small portion of your application.

Before you dive into the model and the controller and the view, start
writing assumptions you are making about how the application "should"
perform. Lets say we have a User model that needs to manage articles
and images. Before I have written anything in my model I start
brainstorming requirements in my unit tests







etc.etc. etc.

Immediately, I can start to plan out my application, is it smart to
allow the user to create an image from inside the user model? Should
it be abstracted into its own image model instead? These questions are
easy to answer in tests because the code base is at its most flexible
stage. It would be much harder to abstract these relationships when
you have a controller and view tied to the assumptions you made about
your domain..

Anyway that is my two cents.

On 1/12/06, Hogan, Brian P. <removed_email_address@domain.invalid> wrote:
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid

This topic is locked and can not be replied to.