michaelklishin/cucumber.el

Default cucumber command assumes project has a Rakefile

UltimateGeek opened this issue · 2 comments

The default command doesn't work if you don't have rake setup for a project:

(defcustom feature-cucumber-command "rake cucumber CUCUMBER_OPTS=\"{options}\" FEATURE=\"{feature}\""

This is related to issue #26.

As a point of reference, I have the cucumber command customized to the following for myself:

 '(feature-cucumber-command "bundle exec cucumber {options} \"{feature}\"")

A project that uses cucumber doesn't have to use Rake as its build system. It's perfectly valid to use other build systems to run cucumber. What this feature mode is giving preference to in its design is cucumber ruby (as opposed to other cucumber implementations). And I think that's ok, although over time it would be nice to add support for cucumber-jvm and others.

But for now, I have some suggestions:

  1. Detect if a Rakefile is in the project root: if so, run a new feature-rake-command, else run feature-cucumber-command
  2. Change feature-cucumber-command to have a default value of cucumber {options} \"{feature}\"
  3. Detect if a Gemfile is in the project root: if so, prepend the run command with bundle exec

How does that sound? If good, I can make the changes.

@UltimateGeek yup, those sound reasonable to me. Thank you!

This issue is resolved by pull request #71