From: Tony Arcieri Date: 2011-04-01T02:47:47+09:00 Subject: Re: Troubles with autotest and rspec2 --0016e6d588bcfe15a9049fcae33d Content-Type: text/plain; charset=ISO-8859-1 Heh, thanks for the help as well :) On Thu, Mar 31, 2011 at 10:40 AM, Jeremy Hinegardner wrote: > On Thu, Mar 31, 2011 at 01:24:53PM +0900, Tony Arcieri wrote: > > I'm trying to use autotest in conjunction with RSpec 2. Almost everything > > seems to work... with one exception. > > > > If I change any specs, autotest does the expected focused spec on my > code! > > Great! But if I change the implementation, nada. > > > > It seems like the default mapping that autotest expects between spec > files > > and implementation files is: > > > > spec/foo_spec.rb => lib/foo.rb > > spec/bar_spec.rb => lib/bar.rb > > > > However, I'm following the POLS Ruby gem directory structure, which is: > > > > spec/foo_spec => lib/mygem/foo.rb > > spec/bar_spec => lib/mygem/bar.rb > > > > How do I get autotest to work with this sort of directory structure and > > rspec2? > > > > And before anyone suggests autospec, it's deprecated as of rspec2. If you > > attempt to run the autospec that's installed with rspec2, it tells you > > autospec is deprecated and instructs you to install autotest. > > You can alter how autotest looks at the mappings between tests and files > with an :initialize hook. I'm using minitest/spec and needed to provide > some additional mapping information to autotest to get it to find the right > file <-> spec mapping. > > https://github.com/collectiveintellect/ashbe/blob/master/.autotest > > I can't remember where I pull this from originally, I think possibly > rspec2. > > enjoy, > > -jeremy > > > -- > ======================================================================== > Jeremy Hinegardner jeremy@hinegardner.org > > > -- Tony Arcieri Medioh! Kudelski --0016e6d588bcfe15a9049fcae33d--