Troubles with autotest and rspec2

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.

On Thu, Mar 31, 2011 at 01:24:53PM +0900, Tony A. wrote:

spec/bar_spec.rb => lib/bar.rb
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

Fixed my problem…

Here’s a solution if anyone happens to stumble upon this thread:

https://github.com/shruggers/ChessBoard-Kata/blob/master/.autotest
https://github.com/shruggers/ChessBoard-Kata/blob/master/.autotest

Heh, thanks for the help as well :slight_smile:

On Thu, Mar 31, 2011 at 10:40 AM, Jeremy H.
<[email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs