[rspec-users] Extra Options to Heckle

Scott Taylor mailing_lists at railsnewbie.com
Sun Aug 19 02:35:06 EDT 2007

On Aug 19, 2007, at 2:05 AM, Robert Feldt wrote:

> What would be the best format for heckle options (through
> OptionParser) via the spec-command?
> When we discussed this a few months back I proposed something like:
> One alternative I thought of is to have a standard way to "promote"  
> options to other tools that spec invokes. Along the lines of:
> spec --heckle --options-heckle "--verbose --branches  
> MyModule::MyClass#my_method" ...
> and the argument to --options-heckle (or --options-rcov etc) would  
> simply be passed along in the call to heckle. This would cover more  
> situations with a single solution.

I've cooked up a patch for a tiny-little recursive parser in the  
command line parsing to deal with the promotion of options, so that  
you could do something like this:

spec --heckle "MyClass --verbose --timeout 10"

So far only the --verbose and --timeout options are used (and I'm not  
sure that they are even working yet, since I haven't used heckle on  
anything but an rspec project).

I haven't worked more on the patch because I figured it would get  
rejected for the added complexity in command line parsing of arguments.

Robert: Maybe if you would like to take a look at my changes, I could  
email you what I have so far, and we could divide up work on the rest  
of the heckle options.  So far I have two, and there are only 8 or  
so, and at this point most of them look pretty trivial to implement.


More information about the rspec-users mailing list