Package

org.specs2.specification

script

Permalink

package script

Visibility
  1. Public
  2. All

Type Members

  1. case class BulletTemplate(bullet: String = "*") extends ScriptTemplate[Scenario, GivenWhenThenLines] with Product with Serializable

    Permalink

    The bullet template associates lines starting with * and a keyword given / when ou then to given / when / then steps

  2. case class BulletedExamplesTemplate(factory: FragmentFactory)(implicit params: GroupTemplateParameters = ...) extends ScriptTemplate[GroupsScript, FragmentsScriptLines] with Product with Serializable

    Permalink

    Analyse a piece of text and group Fragments belonging to the same group

  3. case class BulletedExamplesTemplateParameters() extends GroupTemplateParameters with Product with Serializable

    Permalink
  4. abstract class DelimitedStepParser[T] extends StepParser[T]

    Permalink

    A Delimited step parser uses a delimiter ({} by default) to know which string to extract from the text

  5. class DelimitedStepParser1[T] extends DelimitedStepParser[T]

    Permalink
  6. class DelimitedStepParser10[T] extends DelimitedStepParser[T]

    Permalink
  7. class DelimitedStepParser2[T] extends DelimitedStepParser[T]

    Permalink
  8. class DelimitedStepParser3[T] extends DelimitedStepParser[T]

    Permalink
  9. class DelimitedStepParser4[T] extends DelimitedStepParser[T]

    Permalink
  10. class DelimitedStepParser5[T] extends DelimitedStepParser[T]

    Permalink
  11. class DelimitedStepParser6[T] extends DelimitedStepParser[T]

    Permalink
  12. class DelimitedStepParser7[T] extends DelimitedStepParser[T]

    Permalink
  13. class DelimitedStepParser8[T] extends DelimitedStepParser[T]

    Permalink
  14. class DelimitedStepParser9[T] extends DelimitedStepParser[T]

    Permalink
  15. class DelimitedStepParserSeq[T] extends DelimitedStepParser[T]

    Permalink
  16. case class FragmentsScriptLines(blocks: Seq[Fragments]) extends ScriptLines with Product with Serializable

    Permalink

    Block of fragments

  17. trait GWT extends StepParsers with Scripts

    Permalink

    The GWT trait can be used to associate a piece of text to Given/When/Then steps according to the [BDD](http://en.wikipedia.org/wiki/Behavior-driven_development) way of describing acceptance criteria

  18. trait GWTLines extends AnyRef

    Permalink
  19. case class GivenLines(lines: Seq[String]) extends GWTLines with Product with Serializable

    Permalink
  20. case class GivenWhenThenLines(lines: Seq[GWTLines] = Seq()) extends ScriptLines with Product with Serializable

    Permalink

    Set of extracted lines from some text which are either: simple text, given text, when text or then text

  21. trait GroupTemplateParameters extends AnyRef

    Permalink
  22. case class GroupsScript(title: String = "groups", isStart: Boolean = true, groups: GroupsLike)(implicit template: ScriptTemplate[GroupsScript, FragmentsScriptLines], factory: FragmentFactory) extends Script with Product with Serializable

    Permalink

    This script associates lines extracted by a template to example bodies defined by a GroupsLike trait.

    This script associates lines extracted by a template to example bodies defined by a GroupsLike trait.

    It can be called several times with a groupIndex and exampleIndex to know exactly which groups and examples it should start associating

  23. case class LastLinesScriptTemplate() extends ScriptTemplate[Scenario, GivenWhenThenLines] with Product with Serializable

    Permalink

    The LastLines template takes the number of given / when / then steps of the scenario and associate the last (non-empty) lines of the text with them

  24. trait Scenario extends Script

    Permalink

    A sequence of GWT steps.

  25. trait Script extends AnyRef

    Permalink

    A Script is responsible for analysing a piece of text an creating a sequence of fragments.

    A Script is responsible for analysing a piece of text an creating a sequence of fragments.

    It usually uses a ScriptTemplate specifying how to parse the text into block of lines that the Script knows how to transform to fragments.

    For example a GWT script (a Scenario) stores functions to create Given/When/Then steps and examples and the LastLinesScriptTemplate extract the last lines of a piece of text and divides them into blocks of Given/When/Then lines based on the number of steps in the Scenario.

  26. trait ScriptLines extends AnyRef

    Permalink

    set of lines returned by a ScriptTemplate

  27. trait ScriptTemplate[T <: Script, L <: ScriptLines] extends AnyRef

    Permalink

    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.

    For example a script.Specification has a Script which takes text and asks the BulletedExamplesTemplate to return FragmentsScriptLines containing Text fragments for normal text and Examples for text that's starting with +

  28. trait Scripts extends AnyRef

    Permalink

    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

  29. abstract class Spec extends specs2.Spec with SpecLike

    Permalink
  30. trait SpecLike extends specs2.Spec with Scripts with GroupsLike

    Permalink

    Trait for the script.Spec abstract class

  31. abstract class Specification extends SpecificationLike

    Permalink

    This Specification trait is using a Script (GroupScript) and a default template BulletedExamplesTemplate to associate extracted examples text (where there are + signs) to example bodies coming from a Group.

    This Specification trait is using a Script (GroupScript) and a default template BulletedExamplesTemplate to associate extracted examples text (where there are + signs) to example bodies coming from a Group. tod

  32. trait SpecificationLike extends specs2.SpecificationLike with Scripts with GroupsLike

    Permalink

    Trait for the script.Specification abstract class

  33. trait StandardDelimitedStepParsers extends AnyRef

    Permalink

    a few delimited parsers (with {}) to extract ints, doubles and strings

  34. trait StandardRegexStepParsers extends AnyRef

    Permalink

    a few regular expression parsers to extract ints, doubles and strings (strings are delimited with ")

  35. trait StepParser[T] extends AnyRef

    Permalink

    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

  36. trait StepParsers extends ImplicitParameters

    Permalink

    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

  37. case class TextLines(lines: String) extends GWTLines with Product with Serializable

    Permalink
  38. case class ThenLines(lines: Seq[String]) extends GWTLines with Product with Serializable

    Permalink
  39. case class WhenLines(lines: Seq[String]) extends GWTLines with Product with Serializable

    Permalink

Value Members

  1. object GivenLines extends Serializable

    Permalink
  2. object StandardDelimitedStepParsers extends StandardDelimitedStepParsers

    Permalink
  3. object StandardRegexStepParsers extends StandardRegexStepParsers

    Permalink
  4. object StepParser extends StepParsers

    Permalink
  5. object StepParsers extends StepParsers

    Permalink
  6. object TextLines extends Serializable

    Permalink
  7. object ThenLines extends Serializable

    Permalink
  8. object WhenLines extends Serializable

    Permalink

Ungrouped