CukeCommander
The cuke_commander gem provides an easy and programmatic way to build a command line for running Cucumber.
Installation
Add this line to your application's Gemfile:
gem 'cuke_commander'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cuke_commander
Usage
require 'cuke_commander'
# Choose your Cucumber options
= {tags: ['@tag1', '@tag2,@tag3'],
formatters: {json: 'json_output.txt',
pretty: ''},
options: ['-r features']}
# Use the generator to create an appropriate Cucumber command line
clg = CukeCommander::CLGenerator.new
command_line = clg.generate_command_line()
puts command_line
# This will produce something along the lines of
# cucumber -t @tag1 -t @tag2,@tag3 -f json -o json_output.txt -f pretty -r features
# Use the command line to kick off Cucumber
system(command_line)
Simple!
(see documentation for all implemented Cucumber options)
Contributing
- Fork it ( https://github.com/[my-github-username]/cuke_commander/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request