Marnen Laibow-Koser wrote:

> How so?  I use RSpec for all raw development, largely for two reasons:
> 
> * I like the syntax.

you.should be(:flogged)

> [regarding fixtures]
>> I _enjoy_ their fragility (in their current incarnation). It forces you 
>> to
>> review your tests.
> 
> I *really* don't understand this.  Could you clarify?

When we say "fragile", we mean a test failed because we changed the fixtures 
for 
another test.

When we say "failed", we mean SUCCEEDED in SLOWING YOU DOWN. A car has brakes, 
headlights, and red lights not so we can stop, but so we can go very fast 
between stoppings.

When another test fails unexpectedly, you look at it and think about it. It 
might remind you of the original meaning of the fixture you are changing. It 
might force you to improve the assertion, to actually detect that test's 
situation better.

Or it might not, and you just get pissed off, and make a better change to the 
fixtures, or you might clone your fixture, or you might even start abusing 
mocks 
in frustration.

Either way, it's the overlap between tests, test-side code, and production 
code, 
that keeps everyone honest.

>> If anything in TDD is fragile, or leads to too much debugging (p 
>> statements),
>> revert and try again.
> 
> Doesn't this contradict the previous sentence?

Revert early and often.

>> TDD makes fragility an asset.
> 
> Doesn't *this* contradict the previous sentence?

Reverting forces you to try a narrower change next time. Narrow changes are 
overwhelmingly better than wide sweeping changes.

-- 
   Phlip
   http://flea.sourceforge.net/resume.html


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to