Project

rcomp

0.0
No commit activity in last 3 years
No release in over 3 years
Command line output testing framework with dead simple tests
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.5.0
~> 1.2.1
>= 0

Runtime

~> 0.3.6
~> 0.16.0
 Project Readme

RComp Code Climate Build Status

RComp is a simple framework for testing command line application output. It works by passing a specified command tests (files) by argument and comparing the result with expected output.

Installation

$ gem install rcomp

Usage

$ rcomp
Tasks:
  rcomp generate     # Generate expected output for all tests
  rcomp help [TASK]  # Describe available tasks or one specific task
  rcomp init         # Setup rcomp test directory
  rcomp test         # Run all tests
  rcomp version      # Prints RComp's version information

Setup

In your project root directory, run:

$ rcomp init

Then create some tests in rcomp/tests

Structure

After running rcomp init the following directories are created by default:

.
|--rcomp
|----tests
|----expected
|----results

tests

Stores test files. All subdirectories will be searched for tests.

expected

Stores the expected output of tests. Format is testname.out for stdout and testname.err for stderr.

results

Managed by RComp. Stores the results of your most recent test suite run.


A simple RComp suite might look like:

.
|--rcomp
|----tests
|------test1.test
|------dir
|--------test2.test
|----expected
|------test1.out
|------dir
|--------test2.out
|--------test2.err

Configuration

All custom configuration is stored in .rcomp as YAML

Setting Config Default Description
command command: [COMMAND] Command RComp will run tests with
directory directory: [DIRECTORY] rcomp Directory RComp will store tests, results and expected in
ignore ignore: - [PATTERN] List of patterns RComp will ignore when finding tests
timeout timeout: [TIMEOUT] 5 Test execution time limit (seconds)

Aliases

Task Alias
test t
generate g
version -v--version

Copyright

Copyright (c) 2012 Chris Knadler. See LICENSE for details.