[rspec-users] autotest and rspec_on_rails not happy

Tom Stuart tom at experthuman.com
Thu May 31 07:19:31 EDT 2007


On 30 May 2007, at 22:17, Tom Stuart wrote:
> Everything's happy again now, especially me.

I've stopped being happy again, although this time for a different  
reason!

I've got (let's say) one spec, with (let's say) 10 examples in it.  
autotest + rspec work like a charm as long all the examples pass, but  
if I change my code so that (let's say) 4 of the examples fail,  
things start to get out of control.

autotest runs automatically after I make the broken change, which is  
fine:

> script/spec -O spec/spec.opts spec/models/matcher_spec.rb
> FFFF......

But then if I just touch a file so that it runs again, it does this:

> script/spec -O spec/spec.opts  spec/models/matcher_spec.rb; script/ 
> spec -O spec/spec.opts  spec/models/matcher_spec.rb; script/spec -O  
> spec/spec.opts  spec/models/matcher_spec.rb; script/spec -O spec/ 
> spec.opts  spec/models/matcher_spec.rb
> FFFF......
> FFFF......
> FFFF......
> FFFF......

And if I touch again, I get:

> script/spec -O spec/spec.opts  spec/models/matcher_spec.rb; script/ 
> spec -O spec/spec.opts  spec/models/matcher_spec.rb; script/spec -O  
> spec/spec.opts  spec/models/matcher_spec.rb; script/spec -O spec/ 
> spec.opts  spec/models/matcher_spec.rb; script/spec -O spec/ 
> spec.opts  spec/models/matcher_spec.rb; script/spec -O spec/ 
> spec.opts  spec/models/matcher_spec.rb; [...16 times...]
> FFFF......
> FFFF......
> FFFF......
> FFFF......
> FFFF......
> FFFF......
> [...16 times...]

As you can imagine, as time goes by, this isn't doing much for my  
productivity. If I actually fix the breakage so that all the examples  
pass again, and wait for the 4^n invocations of script/spec to  
finish, I'm back in a healthy sitaution again, but once more examples  
start failing it starts spiraling off again...

This is all a great incentive to never break my code but I need  
something a little gentler for now. Before I spend too much time  
investigating it, does anyone have any intuition about whether this  
is a zentest or an rspec_on_rails issue?

Cheers,
-Tom


More information about the rspec-users mailing list