Cory Foy

Tuesday, January 15, 2008

Small quirk in RubyFit

If you are working with FitNesse and Ruby, you've no doubt run into RubyFit. Installable by gem, it's a great way to get up and running with Ruby in FitNesse.

Last week on the main FitNesse list, we found a small quirk. A poster was trying to get running with it, but was only seeing the error message when running their tests. Clicking on the Error logs, he only saw a listing of warnings - mainly around @verbose not being initialized in fit_server.rb.

I spun up a quick instance and was able to reproduce the issue. Upon digging into the fit_server.rb code, I saw the following line for initializing @verbose:

if arg_count == 4 and arg_list.shift == '-v'
   @verbose = true

In other words, when you specify your COMMAND_PATTERN, if -v isn't the last thing in the pattern, you won't turn on verbose mode. So it needs to look something like:

!define COMMAND_PATTERN {ruby -I %p -I
/var/lib/gems/1.8/gems/fit-1.1/lib/
/var/lib/gems/1.8/gems/fit-1.1/bin/FitServer.rb -v}

I'll be filing a bug hopefully this week to change fit_server.rb.


Update (1/15/08): Bug Filed

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home