org.specs2.specification.script
Type members
Classlikes
A Delimited step parser uses a delimiter ({}
by default) to know which string to extract from the text
A Delimited step parser uses a delimiter ({}
by default) to know which string to extract from the text
List of fragments with utility functions to manipulate it
List of fragments with utility functions to manipulate it
- Companion
- object
A Script is an object responsible for analysing a piece of text and creating a sequence of fragments.
A Script is an object responsible for analysing a piece of text and creating a sequence of fragments.
It is first created with a list of fragments executions (some code) and when the fragments
method is called it can
associate each execution to some portion of text according to a template.
For example a GWT script (a Scenario
) stores functions to create Given/When/Then steps and examples and the
LastLinesScriptTemplate
extracts the last lines of a piece of text, divides them into blocks of Given/When/Then
lines based on the number of steps in the Scenario.
See the GWTSpec in the examples module
set of lines returned by a ScriptTemplate
set of lines returned by a ScriptTemplate
A ScriptTemplate parses some text to create ScriptLines that the associated script knows how to translate to Fragments.
A ScriptTemplate parses some text to create ScriptLines that the associated script knows how to translate to Fragments.
The Scripts trait builds fragments based on Script objects.
The Scripts trait builds fragments based on Script objects.
When the script starts, a section tag is inserted and when it ends another one as well. Also when the scripts ends, it is passed the previous text for analysis to extract new fragments
- Companion
- object
These classes and traits enrich regular specifications with the possibility to include "scripts" in their definition. (see Scripts.scala)
These classes and traits enrich regular specifications with the possibility to include "scripts" in their definition. (see Scripts.scala)
a few delimited parsers (with {}
) to extract ints, doubles and strings
a few delimited parsers (with {}
) to extract ints, doubles and strings
- Companion
- object
a few regular expression parsers to extract ints, doubles and strings (strings are delimited with "
)
a few regular expression parsers to extract ints, doubles and strings (strings are delimited with "
)
- Companion
- object
A StepParser is a function to extract a value of type T
from a piece of text It can also strip the text from
delimiters if any
A StepParser is a function to extract a value of type T
from a piece of text It can also strip the text from
delimiters if any
- Companion
- object
StepParsers are using delimiters or regular expressions with groups to extract values from a piece of text and possibly strip it from delimiters if necessary
StepParsers are using delimiters or regular expressions with groups to extract values from a piece of text and possibly strip it from delimiters if necessary
- Companion
- object