Here’s how to set it up – I’m assuming that you’ve already got a Rails application with the RSpec plugins installed:
Download and install Snarl (version 1.6). You’ll also be asked to install Melon, a Windows development toolkit, but you only need to install the core component when prompted.
Install ZenTest (version 3.6.1): gem install --include-dependencies ZenTest
Install diff-lcs (version 1.1.2): gem install diff-lcs
Update: see the comments for additional information about this gem.
Install ruby-snarl (version 0.0.8): gem install ruby-snarl
Set the HOME user environment variable to your user profile directory, for example on my system it is set to: C:\Documents and Settings\Rob
Download the install the GNU DiffUtils package – I installed this into my C:\Windows\System32 directory.
-
Download and unzip the famfamfam Silk icons and copy the following files into $RUBY_HOME\lib\ruby\gems\1.8\gems\ZenTest-3.6.1\lib\icons where $RUBY_HOME is the directory where Ruby is installed:
- accept.png
- exclamation.png
- information.png
You can of course use any icons you prefer: I’m currently using Crystal icons from Everaldo Coelho. Just make sure you use PNGs and, if necessary, rename them to accept.png, exclamation.png and information.png.
-
Create a file called .autotest in your Rails application root containing:
require 'autotest/snarl'
-
Open the spec/spec.opts file in your Rails application and remove the
--color
option (if it is present). My file looks like this:--format progress --loadby mtime --reverse
-
From your Rails application root type autotest to start the testing process and you should see Snarl notifications popping up as shown in the screenshot on the right.
Autotest will re-run your specifications each time you change your code and a Snarl notification will popup to tell you if you broke anything.
And finally: if you’re looking for a way to annoy your co-workers then you should take a look at Foz’s sound effects plugin for autotest and maybe use a DHH-style whoops when your specifications fail!
25 comments
Comment on RSpec, autotest and Snarl on Windows by Luis Lavena
December 10th, 2007 @ 20:53 – permalink
Comment on RSpec, autotest and Snarl on Windows by Brian Corrales
December 17th, 2007 @ 15:34 – permalink
Comment on RSpec, autotest and Snarl on Windows by Mike Riley
December 18th, 2007 @ 03:27 – permalink
Comment on RSpec, autotest and Snarl on Windows by Rob Anderton
December 18th, 2007 @ 08:51 – permalink
Comment on RSpec, autotest and Snarl on Windows by Shoaib
December 26th, 2007 @ 02:59 – permalink
Comment on RSpec, autotest and Snarl on Windows by Rob
December 27th, 2007 @ 09:40 – permalink
Comment on RSpec, autotest and Snarl on Windows by Peter Clark
December 29th, 2007 @ 03:19 – permalink
Comment on RSpec, autotest and Snarl on Windows by Rob
December 29th, 2007 @ 10:31 – permalink
Comment on RSpec, autotest and Snarl on Windows by Trent N
December 31st, 2007 @ 12:46 – permalink
Comment on RSpec, autotest and Snarl on Windows by Rob
January 2nd, 2008 @ 11:30 – permalink
Comment on RSpec, autotest and Snarl on Windows by mindtonic
January 28th, 2008 @ 19:14 – permalink
Comment on RSpec, autotest and Snarl on Windows by Rob
January 29th, 2008 @ 10:20 – permalink
Comment on RSpec, autotest and Snarl on Windows by Jens
February 26th, 2008 @ 03:22 – permalink
Comment on RSpec, autotest and Snarl on Windows by kunzmann
February 28th, 2008 @ 03:42 – permalink
Comment on RSpec, autotest and Snarl on Windows by Evan
May 8th, 2008 @ 18:27 – permalink
Comment on RSpec, autotest and Snarl on Windows by Andrey Viana
May 15th, 2008 @ 14:32 – permalink
Comment on RSpec, autotest and Snarl on Windows by Rob Anderton
May 17th, 2008 @ 18:36 – permalink
Comment on RSpec, autotest and Snarl on Windows by Andrew
May 18th, 2008 @ 02:22 – permalink
Comment on RSpec, autotest and Snarl on Windows by zaj
December 2nd, 2008 @ 19:19 – permalink
Comment on RSpec, autotest and Snarl on Windows by Rob Anderton
December 6th, 2008 @ 16:55 – permalink
Comment on RSpec, autotest and Snarl on Windows by Valentine
December 13th, 2008 @ 23:33 – permalink
Comment on RSpec, autotest and Snarl on Windows by Karl O'Keeffe
July 10th, 2009 @ 11:58 – permalink
Comment on RSpec, autotest and Snarl on Windows by Rob Anderton
July 11th, 2009 @ 23:01 – permalink
Comment on RSpec, autotest and Snarl on Windows by marcel
January 21st, 2010 @ 21:06 – permalink
Comment on RSpec, autotest and Snarl on Windows by Rob Anderton
February 1st, 2010 @ 08:47 – permalink
Leave a reply
You can use Markdown in your comment as well as plain HTML. You can use
<filter:jscode lang="ruby">
and</filter:jscode>
tags to surround code blocks (supported languages are css, html, javascript and ruby). Your email address will not be published.If your comment doesn’t appear immediately after posting it could have been marked as spam. Don’t worry: we regularly check for and approve incorrectly filtered comments so you shouldn’t have to wait too long for it to be shown.