I brought this up some time ago.<br><br>I&#39;m trying to use autotest to run specs in a non-rails project.<br><br>FWIW the project is structured using the bones gem.<br><br>$ spec -v<br>rspec 1.1.11<br>k$ gem list zentest<br>
<br>*** LOCAL GEMS ***<br><br>ZenTest (3.11.0, 3.9.1, 3.9.0, 3.8.0, 3.7.1, 3.7.0, 3.6.1)<br><br>$ cat .autotest <br>Autotest.add_hook :initialize do |at|<br>&nbsp; %w{.svn .hg .git .bzr}.each { |exception| at.add_exception(exception) }<br>
&nbsp; at.clear_mappings<br>&nbsp; <br><br>&nbsp; at.add_mapping(%r%^(spec/(spec_helper|shared/.*)|config/(boot|environment(s/test)?))\.rb$%) {<br>&nbsp;&nbsp;&nbsp; at.files_matching %r%^spec/(models|controllers|views|helpers)/.*_spec\.rb$%<br>&nbsp; }<br>
&nbsp; at.add_mapping(%r%^lib/(.*)\.rb$%) { |_, m|<br>&nbsp;&nbsp;&nbsp; [&quot;spec/lib/#{m[1]}_spec.rb&quot;]<br>&nbsp; }<br><br>end<br><br>Autotest.add_discovery do<br>&nbsp; &quot;rspec&quot; if File.directory?(&#39;spec&#39;) &amp;&amp; ENV[&#39;RSPEC&#39;]<br>
end<br><br><br>$ autospec<br>loading autotest/rspec<br>/opt/local/bin/ruby -S spec/lib/v_date_time_property_spec.rb spec/lib/v_date_property_spec.rb spec/lib/v_property_spec.rb spec/lib/parser_spec.rb spec/lib/t_z_info_vtimezone_spec.rb <br>
spec/lib/v_date_time_property_spec.rb:8: warning: parenthesize argument(s) for future version<br>spec/lib/v_date_time_property_spec.rb:12: warning: parenthesize argument(s) for future version<br>spec/lib/v_date_time_property_spec.rb:4: undefined method `describe&#39; for main:Object (NoMethodError)<br>
<br><br>For some reason, it&#39;s running the specs as plain old ruby files and the RSpec framework doesn&#39;t seem to be being intialized.<br><br>I&#39;ve done lots of googling about this, and everything about running autotest for RSpec for non-rails projects seems to be quite old.&nbsp; I did find one old post which recommended making a .autotest file in the project with mappings based on the rspec-rails mappings, which is what I tried above, but no joy.<br>
<br>Any insight?<br clear="all"><br>-- <br>Rick DeNatale<br><br>My blog on Ruby<br><a href="http://talklikeaduck.denhaven2.com/">http://talklikeaduck.denhaven2.com/</a><br>