[rspec-users] Newbies are people too

Martin Streicher martin.streicher at gmail.com
Thu Sep 18 08:28:50 EDT 2008

Thanks, Scott. I tend to want to run the real thing to make sure the  
code really does work.

On Sep 17, 2008, at 10:59 AM, rspec-users-request at rubyforge.org wrote:

> Ultimately, it's all about how comfortable you feel.  Mocks will
> always smell bad with rails' associations because of the law of
> demeter violations that it promotes.  On the other hand, using real
> objects and saving to a database can be slow, but at least they give
> you some *feel* of the objects - that is, how they will actually be
> used in a production system.
> One thing that I've realized over the (2) years of testing that I've
> done is that testing is just as much about accustoming you to see
> relevant error message and their context as it is about getting a
> suite green or anything else.  When a real bug pops up when
> integrating, or on staging, you're almost immediately aware of it's
> place and cause.  As I've replaced my test suite with mocks and stubs
> I find that this is less and less true, and I have less and less
> confidence that I'm shipping really solid software.
> So, it's always a tradeoff.  Bend in the directly you feel more
> comfortable.
> Scott

More information about the rspec-users mailing list