Nick Sieger: RSpec Autotest now a Rails Plugin http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin en-us 40 "RSpec Autotest now a Rails Plugin" by Nick <p>mitjok: I haven&#8217;t heard of that problem before&#46; You&#8217;re saying that it&#8217;s missing in <code>rake -T</code> output?</p> <p>Can you verify that the <code>vendor/plugins/rspec_autotest/tasks/rspec_autotest.rake</code> file exists and has contents <a href='http://svn.caldersphere.net/svn/main/plugins/rspec_autotest/tasks/rspec_autotest.rake' rel="nofollow">similar to this</a>?</p> Wed, 21 Feb 2007 20:57:21 +0000 urn:uuid:501eaeb4-cf37-461e-8dde-bdbdf7f8799e http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-211 "RSpec Autotest now a Rails Plugin" by mitjok <p>installed autotest plugin as described above, but spec:autotest did non appear in rake tasks list&#46;&#46; anyone had such problem? rspec_autotest: r69 RSpec&#45;0&#46;7&#46;5&#46;1 r1395 rspec_on_rails r1515</p> Wed, 21 Feb 2007 09:57:34 +0000 urn:uuid:c992f3c0-64e5-459b-91c5-5684490ca908 http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-210 "RSpec Autotest now a Rails Plugin" by Chris Williams <p>I had to change @spec_command to:</p> <p>@spec_command = &#8220;spec&#46;cmd &#45;&#45;diff unified&#8221;</p> <p>To get this to run under Windows&#46; Otherwise autotest tried to execute the ruby file directly, which causes an error&#46;</p> <p>Otherwise, seems to work so far&#46; Thanks!!</p> Fri, 09 Feb 2007 21:52:47 +0000 urn:uuid:c7ecee2a-dfe5-415f-af4f-12a7570baae6 http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-208 "RSpec Autotest now a Rails Plugin" by Chris Anderson <p>Rad! Thanks!</p> <p>I&#8217;m using @spec_command = “drbspec –diff unified”</p> <p>which I think is just the new version of script/railsspec</p> <p>Chris</p> Sat, 06 Jan 2007 03:48:43 +0000 urn:uuid:3f6dff1f-f921-4b66-9de7-35df17c96fa9 http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-180 "RSpec Autotest now a Rails Plugin" by Nick <p>@Michael: I think this is expected behavior for autotest &#45;&#45; I&#8217;ve already noticed this and assumed it was standard behavior&#46; The only time autotest reruns the whole suite is after I&#8217;ve just fixed a failing test or spec&#46; Is it possible that&#8217;s what you&#8217;re observing?</p> Thu, 21 Dec 2006 16:32:03 +0000 urn:uuid:b42062c7-e55c-43a1-a14e-ccc578b44d1c http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-174 "RSpec Autotest now a Rails Plugin" by Michael Johnston <p>Since upgrading to rspec 0&#46;7&#46;5, when a currently being worked&#45;on spec passes, autotest no longer reruns the whole suite of tests&#46;</p> <p>To rephrase: on first run, autotest runs all specs&#46;</p> <p>after editing a file(s) it re&#45;runs the tests for those files&#46;</p> <p>If those pass, it USED to then re&#45;run the whole suite of files&#46; But after upgrading to rspec 0&#46;7&#46;5 it no longer does this, rendering it useless as the only way to see the next failing spec to work on is to restart it (or touch everything)</p> <p>Has anyone else encountered this problem or have any idea what could be causing it?</p> Thu, 21 Dec 2006 10:45:09 +0000 urn:uuid:be21ba84-5339-4565-8f33-226041ff9d39 http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-173 "RSpec Autotest now a Rails Plugin" by Jodi <p>Thank you v&#45;much Nick&#46;</p> <p>Just making the leap to rspec on a new project &#45; very happy to continue having autotest &#45; and the growl notification to boot&#46;</p> <p>Jodi</p> Fri, 15 Dec 2006 22:52:56 +0000 urn:uuid:48d8369c-4a68-4a79-a257-454dbd2c329d http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-169 "RSpec Autotest now a Rails Plugin" by Nick <p>@Shakhruz: yeah, you&#8217;re right, especially about diff&#45;lcs &#45;&#45; that should be mentioned&#46; I suppose if I used</p> <pre><code>File.join(File.dirname(__FILE__), "..", "lib", "rspec_autotest") </code></pre> <p>instead that would be more platform agnostic&#46;</p> <p>Thanks!</p> Wed, 29 Nov 2006 15:37:34 +0000 urn:uuid:9be555b6-f0f4-4f20-8518-1d624482efdb http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-166 "RSpec Autotest now a Rails Plugin" by Shakhruz <p>Hi Nick! Thanks for the plugin! I had to change slashes in rspec_autotest&#46;rake, line 3 : require File&#46;dirname(<strong>FILE</strong>) + &#8216;&#46;&#46;lib spec_autotest&#8217; and make &#8216;gem install diff&#45;lcs&#8217;</p> <p>to make in work on winxp (yes, i&#8217;m still there :))</p> Tue, 28 Nov 2006 22:01:44 +0000 urn:uuid:cd0f46f9-dfb2-4e26-ae41-0bbc1bfc9513 http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-165 "RSpec Autotest now a Rails Plugin" by Akira <p>Is there a way to use the rspec_autotest outside of Rails i&#46;e&#46; generic Ruby code?</p> <p>i&#46;e&#46; autotest can automatically pick up code and test files by placing the files in /lib and /test directories, respectively&#46;</p> <p>Is there similar functionality with rspec_autotest?</p> Sat, 18 Nov 2006 20:16:01 +0000 urn:uuid:0f00faec-fde7-49cc-943f-5bc750abc1c9 http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-156 "RSpec Autotest now a Rails Plugin" by Nick <p>Well, <a href='http://rubyforge.org/tracker/index.php?func=detail&amp;aid=6732&amp;group_id=419&amp;atid=1680' rel="nofollow">here&#8217;s a patch</a>&#46; I&#8217;d be happy to have it included in Autotest, I just didn&#8217;t know if you guys thought it was appropriate to have it there&#46;</p> Fri, 17 Nov 2006 17:39:15 +0000 urn:uuid:a72a1ca8-928d-4288-9be7-1ff69bb481de http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-155 "RSpec Autotest now a Rails Plugin" by Ryan Davis <p>Why didn&#8217;t you submit this as a patch to ZenTest???</p> Fri, 17 Nov 2006 16:09:07 +0000 urn:uuid:53bf4ec9-1210-4a9f-b450-3482c972982d http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-154 "RSpec Autotest now a Rails Plugin" by Nick <p>@Marc: good idea, I should let you configure whether or not to use <code>rails_spec</code> in the next version&#46; <a href='http://trac.caldersphere.net/projects/main/ticket/119' rel="nofollow">Ticked filed</a>&#46;</p> Fri, 17 Nov 2006 15:58:53 +0000 urn:uuid:f8dda09d-d7ca-4bcb-8a55-137e91dba8fa http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-153 "RSpec Autotest now a Rails Plugin" by Marc Beyerlin <p>This is really cool! Thanx for that&#46;</p> <p>I recommend using autotest with the rails<em>spec</em>server&#46; This is much faster&#46; You only have to start a reails<em>spec</em>server with:</p> <p>script/rails<em>spec</em>server</p> <p>And change the spec<em>command in rspec</em>autotest to: </p> <h1>@spec_command = &#8220;spec &#45;&#45;diff unified&#8221;</h1> <p>@spec<em>command = &#8220;script/rails</em>spec &#45;&#45;diff unified&#8221; </p> Thu, 16 Nov 2006 22:01:34 +0000 urn:uuid:139d5aa9-5a71-4e67-9ddf-d8a679160da8 http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-152 "RSpec Autotest now a Rails Plugin" by Josh C <p>Wow thanks Nick, been waiting for this!</p> Wed, 15 Nov 2006 18:07:14 +0000 urn:uuid:507404ad-3c28-4287-800f-f0935ff06703 http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin#comment-151 RSpec Autotest now a Rails Plugin <p>Inspired by a <a href="http://rubyforge.org/pipermail/rspec-devel/2006-November/001219.html">posting on the RSpec list</a> and recent <a href="http://blog.nicksieger.com/articles/2006/09/13/auto-rspec#comment-143">comments stating that my Auto RSpec hack wasn&#8217;t working</a>, I&#8217;ve bitten the bullet and upgraded to <a href="http://rspec.rubyforge.org/upgrade.html">RSpec 0&#46;7&#46;2</a>, and made <code>rspec_autotest</code> <a href="http://svn.caldersphere.net/svn/main/plugins/rspec_autotest">a plugin</a> in the process&#46; So, herewith are the necessary incantations to auto&#45;rspec your project&#46; If you&#8217;ve tried my hack already, please remove any bits you previously had installed&#46;</p> <ul> <li>Install RSpec on Rails, following the <a href="http://rspec.rubyforge.org/documentation/rails/install.html">original instructions</a>&#46; As of RSpec 0&#46;7&#46;3, the specific version of ZenTest is no longer required&#46; Also, diff&#45;lcs is required to show unified diff output on <code>should ==</code> failures&#46;</li> </ul> <div class="typocode"><pre><code class="typocode_default ">gem install zentest -v 3.4.1 gem install diff-lcs gem install rspec script/plugin install svn://rubyforge.org/var/svn/rspec/tags/REL_0_7_2/vendor/rspec_on_rails/vendor/plugins/rspec</code></pre></div> <ul> <li>Install <code>rspec_autotest</code></li> </ul> <div class="typocode"><pre><code class="typocode_default ">script/plugin install http://svn.caldersphere.net/svn/main/plugins/rspec_autotest</code></pre></div> <ul> <li>Start autotest</li> </ul> <div class="typocode"><pre><code class="typocode_default ">rake spec:autotest</code></pre></div> <p>Please let me know if you experience any problems!</p> Wed, 15 Nov 2006 15:46:00 +0000 urn:uuid:8396524a-7e00-4aad-8727-a5a0b3ec7ef3 Nick Sieger http://blog.nicksieger.com/articles/2006/11/15/rspec-autotest-now-a-rails-plugin rspec rails plugin http://blog.nicksieger.com/articles/trackback/150