Class Frame
Baseclass for Describe, Context, and It.
This class follows the pattern from Lua classes.
Metamethods
Frame:__index (key) | Lookup of missing class members. |
Frame:__call (...) | Get arguments for a instance call. |
Methods
Frame:create (...) | Create a new instance. |
Frame:_init (...) | Initialize a new instance. |
Frame:dispatch (...) | Dispach on type. |
Frame:hasDescriptions () | Check if the frame has descriptions. |
Frame:numDescriptions () | Check number of descriptions. |
Frame:hasFixtures () | Check if the frame has fixtures. |
Frame:numFixtures () | Check number of fixtures. |
Frame:isDone () | Check if the instance is evaluated. |
Frame:descriptions () | Get descriptions. |
Frame:setSubjects (obj) | Set the reference to the subjects collection. |
Frame:subjects () | Expose reference to subjects. |
Frame:setReports (obj) | Set the reference to the reports collection. |
Frame:reports () | Expose reference to reports. |
Frame:setExtractors (obj) | Set the reference to the extractors. |
Frame:extractors () | Expose reference to extractors. |
Frame:setTranslators (obj) | Set the reference to the translators. |
Frame:translators () | Expose reference to translators. |
Frame:setRenders (obj) | Set the reference to the renders. |
Frame:renders () | Expose reference to renders. |
Frame:evalFixture (description, fixture, environment, ...) | Eval a single fixture. |
Frame:eval () | Eval the fixtures over previous dispatched strings. |
Metamethods
- Frame:__index (key)
-
Lookup of missing class members.
Parameters:
- key string lookup of member
Returns:
anyRaises:
on wrong arguments - Frame:__call (...)
-
Get arguments for a instance call.
Parameters:
- ... vararg pass on to dispatch
Returns:
self
Methods
- Frame:create (...)
-
Create a new instance.
Parameters:
- ... vararg list to be dispatched
Returns:
Frame - Frame:_init (...)
-
Initialize a new instance.
Parameters:
- ... vararg list to be dispatched (unused)
Returns:
Frame - Frame:dispatch (...)
-
Dispach on type.
Parameters:
- ... vararg list to dispatch
Returns:
self - Frame:hasDescriptions ()
-
Check if the frame has descriptions.
Returns:
boolean - Frame:numDescriptions ()
-
Check number of descriptions.
Returns:
number - Frame:hasFixtures ()
-
Check if the frame has fixtures.
Returns:
boolean - Frame:numFixtures ()
-
Check number of fixtures.
Returns:
number - Frame:isDone ()
-
Check if the instance is evaluated.
Returns:
boolean - Frame:descriptions ()
-
Get descriptions.
Returns:
list of descriptions - Frame:setSubjects (obj)
-
Set the reference to the subjects collection.
This keeps a reference, the object is not cloned.
Parameters:
- obj table somehow maintain a collection
Returns:
selfRaises:
on wrong arguments - Frame:subjects ()
-
Expose reference to subjects.
Returns:
list of subjects - Frame:setReports (obj)
-
Set the reference to the reports collection.
This keeps a reference, the object is not cloned.
Parameters:
- obj table somehow maintain a collection
Returns:
selfRaises:
on wrong arguments - Frame:reports ()
-
Expose reference to reports.
Returns:
list of reports - Frame:setExtractors (obj)
-
Set the reference to the extractors.
This keeps a reference, the object is not cloned.
Parameters:
- obj table somehow maintain a collection
Returns:
selfRaises:
on wrong arguments - Frame:extractors ()
-
Expose reference to extractors.
Returns:
list of extractors - Frame:setTranslators (obj)
-
Set the reference to the translators.
This keeps a reference, the object is not cloned.
Parameters:
- obj table somehow maintain a collection
Returns:
selfRaises:
on wrong arguments - Frame:translators ()
-
Expose reference to translators.
Returns:
list of translators - Frame:setRenders (obj)
-
Set the reference to the renders.
This keeps a reference, the object is not cloned.
Parameters:
- obj table somehow maintain a collection
Returns:
selfRaises:
on wrong arguments - Frame:renders ()
-
Expose reference to renders.
Returns:
list of renders - Frame:evalFixture (description, fixture, environment, ...)
-
Eval a single fixture.
Parameters:
Raises:
on wrong arguments - Frame:eval ()
-
Eval the fixtures over previous dispatched strings.
Returns:
self