disu.se

TestClass

Namespace

Lookout::Rake::Tasks

Ancestors
  1. Rake::DSL

  2. Object

Rake task for running expectation tests.

Constructor

initialize(optionsHash = {}){ |taskself| … }?#

Defines a Rake task for running expectation tests named name. Also defines a task for running expectations with coverage checking named name:coverage. The default task is set to depend on the name task, unless the default task has already been defined. The :check task is likewise set to depend on name. The name task itself and its name:coverage counterpart are set to depend on the :compile task if it’s been defined.

Optionally yields the task being created so that it may be adjusted further before being defined.

Options
:nameSymbol = :test

The name of the task

:pathsArray<String> = ['lib']

The paths to add to $LOAD_PATH

:requiresArray<String> = []

The libraries to require

:filesArray<String> = FileList[ENV['TEST']]

The expectation files to load

:inventoryInventory = Inventory::Rake::Tasks.inventory

The Inventory to look for :paths, :requires, and :files in, see #inventory= (the default is only used if inventory/rake-1.0 has been required)

:specificationGem::Specification

The Gem specification to look for :paths and :requires in, see #specification=

:optionsArray<String> = ['-w']

The options to pass to ruby

Instance Methods

pathsArray<String>#

Returns the paths to add to $LOAD_PATH; may load #specification.

requiresArray<String>#

Returns the libraries to require; may load #specification.

filesArray<String>#

Returns the expectation files to load, defaulting to FileList['test/unit/**/*.rb].

inventory=(inventoryInventory)Inventory#

Sets and returns the new inventory to use for #paths, #requires, and #files: inventory.

specificationGem::Specification#

Returns the specification to use; will try to find one by looking for *.gemspec in the current directory.

RaisesRuntimeError

If no specification has been set and one can’t be found in the current directory (the project root directory)

specification=(specificationGem::Specification)Gem::Specification#

Returns the new specification to use for #paths and #requires: specification.

nameSymbol#

Returns the name of the task.

name=(valueSymbol)Symbol#

Sets and returns the new name of the task: value.

paths=(valueArray<String>)Array<String>#

Sets and returns the new paths to add to $LOAD_PATH: value.

requires=(valueArray<String>)Array<String>#

Sets and returns the new libraries to require: value.

files=(valueArray<String>)Array<String>#

Sets and returns the new expectation files to load: value.

inventoryInventory#

Returns the inventory to use.

optionsArray<String>#

Returns the options to pass to ruby.

options=(valueArray<String>)Array<String>#

Sets and returns the new options to pass to ruby: value.