[rspec-users] autotest and rspec_on_rails not happy

Kyle Hargraves philodespotos at gmail.com
Thu May 31 08:28:04 EDT 2007


On 5/31/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> On 5/31/07, Tom Stuart <tom at experthuman.com> wrote:
> > 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?
>
> I've not heard of this before and can't reproduce it. Which file are
> you touching to get this to happen?

I have the same issue. I typically only notice when working on a
controller, since my controller specs are often larger than my model
or view specs, so 16+ runs can take quite a while, but it happens with
everything AFAICT.

As an example to recap: Turn on autotest, get my green. Comment out
the Model.find(:all) from my index action, save, and get 2 failures.
Save again without changing anything, get the same 2 failures, but
autotest runs a second time. Save once more, autotest runs four times.
Again, 8. And so on.

I'm currently running Rails r6868, rspec+rspec_on_rails r2049, and
ZenTest 3.6.0 on OS X 10.4.9.
Also using growlnotify with a .autotest I found at
http://blog.internautdesign.com/2006/11/12/autotest-growl-goodness.

Any other information that could help?

Kyle


More information about the rspec-users mailing list