Skip to content
Cucumber step definitions for testing command line applications
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
doc
features
sandbox
.gitignore
.travis.yml
Gemfile
Gemfile.lock
LICENSE
README.md
Runfile

README.md

clicumber

Build Status

Cucumber step definitions for testing command line applications.

If you...

  • Love testing with Cucumber
  • Love making command line apps

Then read on. Otherwise, here is a random cat.

Usage

Grab a copy of the step definitions file and place it in your step_definitions folder.

To see the available steps, look at the showcase feature file or at the step definitions summary.

If you do not have your cucumber environment set up already, you can also execute run scaffold in the repository's folder. It will generate a scaffold folder for you with everything you need to get started.

Features

  • Steps for running any command and capturing its output, stderr and exit code
  • Steps for querying folder status
  • Steps for querying file status and contents
  • Steps for creating file and folder fixtures
  • Steps for querying the command's output, stderr and exit code

Downloading the Step Definitions file programmatically

If you are using the step definitions file as is in your project (recommended), then you can add a rake task or shell script to fetch a fresh copy of it on demand:

curl -o 'features/step_definitions/clicumber.rb' https://raw.githubusercontent.com/DannyBen/clicumber/master/features/step_definitions/clicumber.rb

If you are using Runfile, you can use this task:

help   "Download a fresh copy of clicumber stepdefs"
action :clicumber do
  file = "features/step_definitions/clicumber.rb"
  url  = "https://raw.githubusercontent.com/DannyBen/clicumber/master/features/step_definitions/clicumber.rb"
  exec "curl -o '#{file}' #{url}"
end

You can’t perform that action at this time.