Nick Sieger: RSpec Autotest for Standalone Projects http://blog.nicksieger.com/articles/2007/01/30/rspec-autotest-for-standalone-projects en-us 40 "RSpec Autotest for Standalone Projects" by Victor <p>Love it! Thanks, Nick.</p> <p>One feature request: It would be nice to have a task to run it against the spec server which is much faster.</p> <p>Something like:</p> <pre> namespace :spec do task :autotest do require_rspec_autotest RspecOnRailsAutotest.run end task :autotest_drb do require_rspec_autotest autotest = RspecOnRailsAutotest.new autotest.spec_command = "drbspec --diff unified" autotest.run end private def require_rspec_autotest require File.join(File.dirname(__FILE__), '..', 'lib', 'rspec_autotest') end end </pre> Tue, 30 Jan 2007 16:45:52 +0000 urn:uuid:5f5834cb-fff8-408a-86f7-bed53dc85889 http://blog.nicksieger.com/articles/2007/01/30/rspec-autotest-for-standalone-projects#comment-205 RSpec Autotest for Standalone Projects <p>I know there has been some demand out there for a version of my <a href="/articles/2006/11/15/rspec-autotest-now-a-rails-plugin">RSpec Autotest Rails plugin</a> that works with standalone (non-Rails) projects, so I finally caved and coded it up. I really hope this does finally get accepted as <a href="https://rubyforge.org/tracker/?func=detail&amp;aid=6732&amp;group_id=419&amp;atid=1680">a patch to ZenTest</a> (nudge, nudge), but until it gets a more standard release, do try it out:</p> <ol> <li>Ensure you have ZenTest installed (<code>gem install ZenTest</code>).</li> <li><a href="http://svn.caldersphere.net/svn/main/rspec_autotest/trunk/lib/rspec_autotest.rb">Download the rspec_autotest.rb file here</a> and put it in the <code>spec</code> directory of your project.</li> <li>Add this snippet of code into your <code>Rakefile</code>, and <code>rake spec:autotest</code> as usual.</li> </ol> <div class="typocode"><pre><code class="typocode_ruby "><span class="ident">namespace</span> <span class="symbol">:spec</span> <span class="keyword">do</span> <span class="ident">task</span> <span class="symbol">:autotest</span> <span class="keyword">do</span> <span class="ident">require</span> <span class="punct">'</span><span class="string">./spec/rspec_autotest</span><span class="punct">'</span> <span class="constant">RspecAutotest</span><span class="punct">.</span><span class="ident">run</span> <span class="keyword">end</span> <span class="keyword">end</span></code></pre></div> <p>Once again, happy spec&#8217;ing, and let me know of any issues you have with it.</p> Tue, 30 Jan 2007 02:16:00 +0000 urn:uuid:ea568e8e-e6f4-4fb7-80df-8da5f50065b9 Nick Sieger http://blog.nicksieger.com/articles/2007/01/30/rspec-autotest-for-standalone-projects ruby rspec autotest http://blog.nicksieger.com/articles/trackback/204