[rspec-users] Autotest bug with rerunning passing tests?

David Chelimsky dchelimsky at gmail.com
Sat Jun 23 16:29:28 EDT 2007


On 6/23/07, Scott Taylor <mailing_lists at railsnewbie.com> wrote:
>
> On Jun 23, 2007, at 4:14 PM, David Chelimsky wrote:
>
> > On 6/23/07, Scott Taylor <mailing_lists at railsnewbie.com> wrote:
> >>
> >> Am I correct in remembering that autotest (with Test::Unit) would
> >> rerun all the tests if a subset of the tests passed?  If so,
> >> shouldn't this behaviour also be present in rspec's autotest library?
> >
> > Yes, but it depends on where you make the change. Let's say you get a
> > failure and you go look at your example and realize there's something
> > wrong and change that. Then autotest will only rerun that example
> > (well, that whole file).
> >
> > If you make the change to subject code, then it should re-run
> > everything once you get the failing example to pass.
> >
> > If you're experiencing something different, please follow up with a
> > bit of detail about what files you're changing and what examples are
> > getting run.
>
> Well actually I was in the refactoring step.  Here is the behaviour:
>
> 1. All of the specs are passing.
> 2. I refactor.
> 3. The subset of specs that apply runs, and passed
> 4. Autotest now waits for the next file change or Interrupt.  Nothing
> else happens (although, now, all of the specs should run)

That's the way autotest works AFAIK. It's not going to rerun
everything until you get a failing example to pass. Otherwise it just
runs the files that map to those that you change.

>
> Scott
>
> P.S. You mentioned that the whole spec file runs with autotest, not
> just the ones that are failing.  Is this a bug in the code, or is it
> presumed that we should be using the --failures option in spec.opts?
>
>
>
> >
> > Also, if you want to take a look at one source of any potential
> > problems, look at @test_mappings in
> > vendor/plugins/rspec_on_rails/lib/autotest/rails_rspec.rb.
> >
> > Cheers,
> > David
> >>
> >> Scott
> >>
> >> _______________________________________________
> >> rspec-users mailing list
> >> rspec-users at rubyforge.org
> >> http://rubyforge.org/mailman/listinfo/rspec-users
> >>
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-users
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list