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, [EMAIL PROTECTED] 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
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users