Yet More RSpec Fun With TextMate! comments

published 16 December 2007
filed under: ruby   TDD  

Why is it that I just can’t leave well enough alone? Here, after several weeks for forehead-impact conditioning, I finally get a working setup with Ruby on Leopard with RSpec and TextMate. Life is good, I have my pretty spec runner window back, I’m a BDD’ing fool. But oh no, I have to keep fiddling with stuff.

So I’m finally putting some foundation work into a nifty little webapp that a (childhood) buddy of mine and I are working on. “Hey”, I think to myself, “why not make it a Rails 2.0 app? Better yet, why not get yer RSpec on too?” Brilliant. Why not? What could possibly go wrong? Well after installing the trunk versions of the RSpec plugin for Rails (of course) my beloved RSpec bundle stopped working. :-(

After a little digging around (including the OS X equivalent of printf debugging, Growl) I realized that I’m probably facing incompatibility issues with the TM bundle and the version of RSpec. Now keep in mind that I’ve got two different RSpec-based projects that I’m using the bundle with. One is a straight-up lib-and-spec directory app (the Programming Collective Intelligence port), and the other is this new Rails app. The former was using version 1.0.8 of the gem, while the latter is using the plugin code that I installed.

So I go back to the RSpec bundle that the RSpec folks put out and lo and behold it works like a champ for my Rails app…but not so much for the standalone project. Oh dear. Now what? Like Doug Flutie vs. Miami I chuck a Hail Mary and run sudo gem update rspec

Updating installed gems...
Attempting remote update of rspec
Successfully installed rspec-1.1.0
1 gem installed
Installing ri documentation for rspec-1.1.0...
Installing RDoc documentation for rspec-1.1.0...
Gems: [rspec] updated

Yayyy! A new version! Now the RSpec bundle for TextMate works in both projects. So, the final recipe goes a little something like this:

  1. Install the latest bleeding-edge RSpec plugin for Rails
  2. Install the RSpec version of the TextMate bundle
  3. Make sure the latest gem (1.1.0) is installed.

OK, now has anyone seen my productivity around here? I’d swear I saw it just before Halloween…

blog comments powered by Disqus