lib/nixt/runner.js
function Runner(options) {
  if (!(this instanceof Runner)) return new Runner(options);
  options = options || {};
  this.options = options;
  this.batch = new Batch;
  this.world = new World;
  this.expectations = [];
  this.prompts = [];
  this.responses = [];
  this.baseCmd = '';
  this.standardInput = null;
}
function Runner(options) {
  if (!(this instanceof Runner)) return new Runner(options);
  options = options || {};
  this.options = options;
  this.batch = new Batch;
  this.world = new World;
  this.expectations = [];
  this.prompts = [];
  this.responses = [];
  this.baseCmd = '';
  this.standardInput = null;
}
function Runner ( options ) { if ( ! ( this instanceof Runner ) ) return new Runner ( options ) ; options = options || { } ; this . options = options ; this . batch = new Batch ; this . world = new World ; this . expectations = [ ] ; this . prompts = [ ] ; this . responses = [ ] ; this . baseCmd = '' ; this . standardInput = null ; }
The primary entry point for every Nixt test.
It provides public interface that the users will interact with.
Every `Runner` instance can be cloned and this way one can build
the so called "templates".

Options:

- colors: default - true,       Strip colors from stdout and stderr when `false`
- newlines: default - true,     Strip new lines from stdout and stderr when `false`

Examples:

Instantiating the class:

nixt() // -> Runner
new nixt // -> Runner

Simple stdout assertion:

nixt({ colors: false, newlines: false })
.exec('todo clear')
.exec('todo Buy milk')
.run('todo ls')
.stdout('Buy milk')
.end(fn);

Stdout assertion:

nixt({ colors: false, newlines: false })
.exec('todo clear')
.run('todo')
.stderr('Please enter a todo')
.end(fn);

So repeating "todo clear" is simply ugly. You can avoid this by
creating a "template".

var todo = nixt().before(clearTodos);

Later on:

todo.clone().exec...

For more examples check the "README" file.

@see Batch
@param {Object} options
@constructor
The primary entry point for every Nixt test . It provides public interface that the users will interact with . Every Runner instance can be cloned and this way one can build the so called templates .