Scott Taylor
2007-Aug-14 20:24 UTC
[rspec-users] Using rspec in a non-rails project w/ autotest
Not sure if anyone needs this, but I have successfully been running rspec/trunk with autotest for a few days now on a non-rails project. The process is pretty simple: 1. Put rspec into vendor/plugins/rspec (on externals, or simply frozen) 2. Add autotest/discover.rb: Autotest.add_discovery do "myproj" end 3. Add autotest/myproj.rb: require File.dirname(__FILE__) + "/../vendor/plugins/rspec/rspec/lib/ autotest/rspec" class Autotest::Myproj < Autotest::Rspec alias :old_spec_commands :spec_commands def spec_commands [File.dirname(__FILE__) + "/../vendor/plugins/rspec/rspec/bin/ spec"] + old_spec_commands end end Autotest should now run fine with trunk rspec (it also means you don''t need the rspec gem installed). Happy hacking, Scott