[rspec-users] changes in rspec's trunk and autotest

David Chelimsky dchelimsky at gmail.com
Fri Jan 11 10:52:07 EST 2008


On Jan 11, 2008 9:45 AM, Tim Glen <tim at pivotib.com> wrote:
> since i'm on rspec trunk, I applied your patch and ran into a little
> issue. All my specs still run but it seems to be looking at and
> "attempting" all of my hidden files and directories (and some other
> stuff too?):
> <snippet>
> Dunno! Capfile
> Dunno! app/helpers/.svn/format
> Dunno! app/views/sales/.svn/text-base/edit.html.erb.svn-base
> Dunno! tmp/sessions/.svn/dir-prop-base
> Dunno! app/helpers/.svn/README.txt
> Dunno! app/helpers/.svn/wcprops/stores_helper.rb.svn-work
> Dunno! app/views/users/.svn/entries
> Dunno! app/.DS_Store
> Dunno! app/controllers/.svn/prop-base/users_controller.rb.svn-base
> Dunno! app/views/markets/.svn/wcprops/index.html.erb.svn-work
> Dunno! spec/views/markets/.svn/text-base/new.html.erb_spec.rb.svn-base
> Dunno! app/views/stores/.svn/wcprops/index.html.erb.svn-work
> Dunno! tmp/cache/.svn/format
> Dunno! app/views/districts/.svn/dir-wcprops
> Dunno! .svn/wcprops/Capfile.svn-work
> Dunno! spec/views/markets/.svn/wcprops/edit.html.erb_spec.rb.svn-work
> </snippet>

This is a new thing autotest is doing. That's just a listing of files
in the current directory or below that autotest doesn't see mapped in
some way.

If you set $VERBOSE to false in .autotest, they won't appear.

The other thing you can do, which I think is the better approach, is
to add an initialize hook in .autotest. Here's mine:

Autotest.add_hook :initialize do |at|
  %w{.hg .git stories tmtags Rakefile Capfile README spec/spec.opts
spec/rcov.opts}.each {|exception|at.add_exception(exception)}
end

The cool thing is this actually works now. Before, these exceptions
got squashed by autotest subclasses (like autotest/rspec).

HTH,
David

>
> Like I said, my specs still run, so things aren't broken per se but
> this behaviour doesn't really seem right to me. Is this happening for
> anyone else or am I some sort of edge case?
>
> take care,
> tim
>
>
> On 10-Jan-08, at 10:29 PM, David Chelimsky wrote:
>
> > This applies to anyone using rspec's trunk from >= 3220 with ZenTest
> > <= 3.7.2.
> >
> > Anyone else, feel free to move on....
> >
> > The next release of ZenTest, coming soon, includes some changes that
> > improve the relationship between Autotest, it's subclasses (like those
> > in rspec) and .autotest, the file that you can use to plug into
> > autotest's hooks to extend/modify it's behaviour.
> >
> > Previously, subclasses got loaded after .autotest, causing changes to
> > test_mappings and exceptions to be overridden. With the next release,
> > the load order is corrected so anything in .autotest will be processed
> > after Autotest::Rspec or Autotest::RailsRspec is loaded.
> >
> > I committed changes to RSpec's trunk r3220 that will break your
> > current autotest configuration. If it does, you can apply this patch
> > (http://pastie.caboo.se/138024) to your local copy of ZenTest
> > (assuming you're up to 3.7.2) and all should be right with the world.
> >
> > Again - this is ONLY for people who are following RSpec's trunk and
> > using autotest.
> >
> > Cheers,
> > David
> > _______________________________________________
> > rspec-users mailing list
> > rspec-users at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rspec-users
>
>


More information about the rspec-users mailing list