Andrew Stopford's Weblog

poobah

Sponsors

News

Articles

Family

Old Blogs

BDD with RSpec\Cucumber\IronRuby.

A great deal of debate has been going on about Alt.NET, what it means, what it does etc. For me the concept means to learn something new and not just in the camp that is my bread and butter but in any sphere of our industry. The one place I have been watching with the most interest is the Ruby camp, sure Rails is getting all the press but what pikes my interest the most is the developments the Ruby community have made in BDD with tools such as RSpec and Cucumber (Cucumber is one of the coolest things I have ever seen).

In the .NET world we have IronRuby if you want to mix and match Ruby and your .NET skills, sadly IR does not play too well with Cucumber. If you take a look at this wiki page while the IR igems lets you obtain cucumber and rspec it seems to do very little. Instead you download MRI and install the Cucumber and RSpec gems then create a icucumber.bat file, one thing to note at this stage is the paths to IronRuby and Ruby may be different to the paths listed in the wiki example. My icucumber looks like

@ECHO OFF
REM This is to tell IronRuby where to find gems.
SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8
@"C:\ironruby\bin\ir.exe" "c:\ruby\bin\cucumber" %*


After installing IR 0.3 and the MRI from the click once installer (makes installing Ruby a breeze).

My experiments came to halt when I tried to run IR and Cucumber with a C# example due to a IR bug but I like what I see and I'll be spending more time with Ruby\RSpec and Cucumber over the coming months.

On a side note I also tried AutoSpec which runs RSpec tests for you as you save changes, auto running of tests is something that Gallio has added to test runners such as Icarus.

Comments

Dew Drop - April 15, 2009 | Alvin Ashcraft's Morning Dew said:

Pingback from  Dew Drop - April 15, 2009 | Alvin Ashcraft's Morning Dew

# April 15, 2009 9:20 AM