#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

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

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


#API Documentation

#Functions

Signaturecp.spec.Definition.is(instance) -> boolean
TypeFunction
DescriptionCalled 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.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/spec/Definition.lua line 30

#Constructors

Signaturecp.spec.Definition(name[, doing]) -> cp.spec.Definition
TypeConstructor
DescriptionCreates a new test definition.
Parameters
  • name - The name
  • doing - doing
Returns
  • cp.spec.Definition object
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/spec/Definition.lua line 13

#Methods

Signaturecp.spec.Definition:run([...]) -> cp.spec.Run
TypeMethod
DescriptionRuns 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
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/spec/Definition.lua line 43