# cp.spec.Definition

A Definition is a superclass for a "runnable" specification. It doesn't do anything itself, but provides a common ancestor for all implementation classes like Specification and Scenario.


# API Overview

Functions - API calls offered directly by the extension

  • is

Constructors - API calls which return an object, typically one that offers API methods

  • Definition

Methods - API calls which can only be made on an object returned by a constructor

  • run

# API Documentation

# Functions

# is

Signature cp.spec.Definition.is(instance) -> boolean
Type Function
Description Called as a method, this will check if the provided object is an instance of this class.
Parameters
  • instance - The instance to check.
Returns
  • true if the instance is an instance of this class.
Notes None
Examples None
Source src/extensions/cp/spec/Definition.lua line 30

# Constructors

# Definition

Signature cp.spec.Definition(name[, doing]) -> cp.spec.Definition
Type Constructor
Description Creates a new test definition.
Parameters
  • name - The name
  • doing - doing
Returns
  • cp.spec.Definition object
Notes None
Examples None
Source src/extensions/cp/spec/Definition.lua line 13

# Methods

# run

Signature cp.spec.Definition:run([...]) -> cp.spec.Run
Type Method
Description Runs the definition with the specified filter string, function or table of strings and functions. The Run will have already started with the provided filter.
Parameters
  • ... - (optional) The list of filters to apply to any child definitions.
Returns
Notes None
Examples None
Source src/extensions/cp/spec/Definition.lua line 43