enkessler / cuke_commander

A gem to generate Cucumber command lines based on parameters.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Basic stuff: Gem Version Project License Downloads

User stuff: Yard Docs

Developer stuff: Build Status Coverage Status Maintainability


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
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(cucumber_options)

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)

Development and Contributing

See CONTRIBUTING.md

License

The gem is available as open source under the terms of the MIT License.

About

A gem to generate Cucumber command lines based on parameters.

License:MIT License


Languages

Language:Ruby 75.3%Language:Gherkin 24.5%Language:Shell 0.3%