sandro / specjour

distributed rspec & cucumber via bonjour
MIT License
213 stars 33 forks source link

Feature request: pass options to cucumber cli #20

Open briandunn opened 13 years ago

briandunn commented 13 years ago

I need to be able to filter the features that are run on tag, like --tags ~@wip I have forked this repo and my first attempt is as follows, borrowing the convention of ENV['CUCUMBER_OPTS'] from cucumber.rake.

https://github.com/briandunn/specjour/blob/master/lib/specjour/cucumber/runner.rb

This doesn't seem to affect the listeners, presumably because the environment of dispatch is not available. Do you have any thoughts on how something like this should be communicated to the listeners?

sandro commented 13 years ago

Thanks for the patches! I'm on vacation at the moment but will be sure to pull in those deprecation fixes when I get back home. As for the cucumber options, I've been wanting to add those for some time but have been unsure of the best way to do it. They probably have to be communicated from the dispatcher to the manager down to the worker. Take a look at the worker_options method in manager.rb. Most of those options get set on the manager by the dispatcher directly (see #set_up_manager in dispatcher.rb). The simplest solution I see is to just follow that pattern. The dispatcher sets the cucumber options on the manager which gets set on the worker. Not an elegant solution but specjour isn't especially elegant.