nathaniel bibler

Random thoughts, links, and code by Nathaniel Bibler

Ruby Gems with Autotest Discovery Break Rails

We’ll start off by clarifying which versions of which software I’m currently running:

I’m developing a basic Ruby on Rails application. Using Test::Unit and Shoulda for the test suite. The issue that I kept running into (sadly, for nearly a couple of hours) was this:

loading autotest/rails_rspec
Autotest style autotest/rails_rspec doesn't seem to exist. Aborting.

My application does not use Rspec, nor do any of the frozen gems or installed plugins. Here’s the kicker:

Simply installing a gem which has a custom autotest/discovery.rb will break you.

In this case, seed-fu, a gem which I was toying around with, contains such a file. Seed-fu was developed testing with Rspec (props for testing!). Simply installing that gem, not even requiring it or referencing it in any manor in my application, had ZenTest’s autotest pick up the rspec requirement and try to run with it. BAD AUTOTEST. NO. How did I fix it?

$ sudo gem uninstall mbleigh-seed-fu