IronRuby & RSpec .csproj Runner

I made the decision a bit ago to start testing my .net assemblies using IronRuby and RSpec.  The short list of reasons are:

a.) Ruby is awesome
b.) BDD is awesome
c.) IronRuby is super awesome

So, I dug in and read everything I could find.  Ran some of the very basic projects, and even worked with my ruby pals to get RSpec testing against my very first .net project.  Rad.

Then reality set in.  This is very new.  I am not afraid of new, it just often means more work then pressing two buttons and everything is shiny.  Instead it’s often to the contrary.

If’ you’ve seen any of the actual .net rspec examples online, you have likely seen something that looks this:

require 'System.Xml.Linq, Version=, 
	Culture=neutral, PublicKeyToken=b77a5c561934e089'
require 'C:\SomeFolder\bin\Debug\SomeLibrary.dll'

On the surface that is innocent enough, it poses a few problems.  The first is that finding the public token key for every reference you have in the GAC is a bit annoying.  Second, most non-trival projects have a lots of references.  Adding those all by hand can be slow as well as sloppy.

Since I am far to lazy to do that, I wrote some code.  I built a command line application that lets you target any .csproj and via reflection and parsing of the xml, It renders the rspec_helpers which include everything you need to test your application. 

Some basic features of it are that you can either walk every project reference and build a spec_helper for each of them as well (default), or simply have them pull in the additional project references as .dll’s or whatever their output type is.

I also added the ability to set the output directory (I usually have a spec folder). 

Here is the rub.  I am not yet ready to share this with the entire world.  If you would like to beta drive this with me and give me feedback, please comment here with your email, email me at [pinvoke] [at] [doublethunk] [dot] [org] or find me on twitter as ‘kuzushi’.

Once I am a bit more comfortable I will publish all the code and spec tests (yes, it’s self proving) to github for the world to enjoy.



Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: