[rspec-users] rspec_autotest failing

Scott Taylor mailing_lists at railsnewbie.com
Fri Oct 26 15:07:59 EDT 2007

On Oct 26, 2007, at 2:51 PM, Steve wrote:

> On Fri, 26 Oct 2007 13:38:09 -0400, Scott Taylor wrote:
>> That's quite outdated.  RSpec now comes with it's own autotest plugin
>> (which should use it by default, if you have the rspec gem  
>> installed).
>> Scott
> I'm running from trunk, and don't have the gem installed. How is
> autotesting enabled? Is it a special switch passed to 'spec' or
> 'spec_server'?

Autotest looks at the load path when it starts up, and then looks in  
each load path for a file named lib/autotest/discovery.rb.  Autotest  
requires rubygems, which by default puts any gems in the loadpath.   
So it goes through, and finds that rspec has this discovery.rb, and  
applies it if makes sense for your project (that is, if the spec/  
directory exists in your project root).

With this knowledge, if you really didn't want to install the gem,  
you could add RAILS_ROOT/discovery.rb to require the discover.rb in  
RAILS_ROOT/vendor/plugins/rspec/lib/autotest/discover.rb - but my  
guess it that's a bit much.

The simple answer, if you just want to get it to work, is to install  
the gem.


More information about the rspec-users mailing list