views:

149

answers:

2

Just riding on the BDD wave for the past 2 days.. I was intrigued with Aslak Hellesoy's InfoQ video on RSpec. Specifically with the language agnostic integration testing framework claims.. SO I was looking at testing a .Net app with Cucumber which seems to be the latest avatar of the BDD story runner.

Followed the examples on cukes.info and the wiki pages to do this. Installed IronRuby too.. However the end-result was different in that I get a huge stacktrace.

Posted a comment on the IronRuby Issue Tracking page for the bug

If anyone has worked around this or knows whats up... please leave a response. Thanks.

+2  A: 

I spent yesterday working with IronRuby and Cucmber. I don't have a solution to your codeplex ticket, but here's what worked for me.

  1. I used IronRuby 0.9 in c:\ironruby and with ir built from DLR change set 27223 (I have those two on my machine).
  2. I added c:\ironruby\bin to my path, so cucumber.bat can find ir.exe.
  3. I used igem install rspec followed by igem install cucumber
  4. I had to steal rubygem files from my ruby install and put them in my source files to bring rubygems up from 1.2 to > 1.3. igem update --system didn't want to work for me.
  5. I then forced an install of hoe (which had been failing) igem install hoe
  6. At that point, I wrote a cucumber feature, had the step definitions look at White.Core.dll to exercise my app under test, and ran c:\ironruby\lib\ironruby\gems\1.8\bin\cucumber --no-color features with success on XP SP3. The --no-color flag is important, or you'll get terminal codes all over the screen.

I avoid the shared gems model if at all possible. I got confused when I tried that, so I went with what seemed easiest. It's worked for me since 0.6.

Ball
Couldn't follow your steal step. coz igem also fails with the same error.
Gishu
A: 

JFYI - Got this working after a bit of thrashing about with cryptic errors. Although this is supposed to be fixed in the next release as per the IronRuby developers, Posting my steps to get this working as of today with the 0.9 release
http://madcoderspeak.blogspot.com/2009/09/testing-net-code-with-cucumber-and.html

Gishu