1

I've used autotest in other project on my machine. I'm now doing a small ruby project that uses rspec.

I can run the tests with rspec spec and they all run.

I've added 'autotest' to my Gemfile and I've bundle'd.
I can run autotest but it doesn't run my rspec tests in spec/

I've added empty .rspec and .autotest files.
I've tried both the autotest and the autotest-standalone gems.
I've reviewed all the info at http://ph7spot.com/musings/getting-started-with-autotest#troubleshooting_autotest_test_detection which was helpful but didn't solve my question.

2
  • 2
    If you want to share something you noticed useful, you could write blog on those... Commented Apr 5, 2014 at 11:30
  • Good idea. I may do that. I usually post to SO first and primarily for greatest reach to help others who may have such a problem. I rely on SO for all the helpful infrastructure it provides. Commented Apr 5, 2014 at 11:33

1 Answer 1

2

Turns out I needed (and didn't have)

gem 'rspec'

in my Gemfile (and then bundle of course)

I hadn't realized this because with rspec on my machine from other projects and thus the ability to do rspec spec 'manually', I didn't realize that I needed to list the gem explicitly i.e. in the Gemfile.

I also verified that:

  • I DO need the .rspec file It's OK if it's empty but it needs to exist.
    It can be created with touch .rspec on *nix.
  • I do NOT require a .autotest file.
Sign up to request clarification or add additional context in comments.

1 Comment

as a general rule I think it is advisable to call rspec within bundle exec rspec to make sure your Gemfile contains the right gems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.