Script

org.specs2.specification.script.Script
trait Script

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

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def fragments(text: String): FragmentsSeq

parse the passed text and return a list of corresponding fragments

parse the passed text and return a list of corresponding fragments

Attributes

def isStart: Boolean

Attributes

Returns

true if this object marks the beginning of the script

def title: String

Attributes

Returns

the title of the script