Troubles with autotest and rspec2

T

Tony Arcieri

[Note: parts of this message were removed to make it a legal post.]

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.
 
J

Jeremy Hinegardner

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
 
T

Tony Arcieri

[Note: parts of this message were removed to make it a legal post.]

Heh, thanks for the help as well :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top