[rspec-users] Autotest with TDD "test-first" problem

Scott Taylor mailing_lists at railsnewbie.com
Sat Feb 23 15:01:19 EST 2008


On Feb 22, 2008, at 12:18 PM, Paul Dowman wrote:

> Hi, I'm mostly quite happy using  autotest with rspec, but there's one
> thing that's been bothering me, and as my test suite grows larger it'd
> becoming more painful.
>
> Autotest re-runs the entire suite whenever a spec that had previously
> failed passes for the first time. I find that incompatible with
> writing tests first in classic TDD style. I write the test which fails
> (because there's no implementation yet), and then just implement the
> method and watch it pass. But now autotest decides to re-run the
> entire test suite, which takes a couple of minutes, and in the
> meantime I'm stuck waiting to see if my next spec will pass or not.
>
> Is it possible to change that behavior somehow, so that it doesn't re-
> run the entire suite every time?


I had the same problem - and decided that Autotest wasn't for me.   
I'm much smarter than autotest, so I know which files I should be re- 
running, and when.

If, as David suggests, you can figure out a good strategy on when to  
rerun the full suite, continue to use it  (just modify the mappings  
in ~/.autotest (or RAILS_ROOT/.autotest)).  Otherwise, autotest is  
pretty much out (unless you want to work on Deeptest, or  
SpecDistributed).

Scott



More information about the rspec-users mailing list