org.specs2.specification

Members list

Type members

Classlikes

trait After extends Context

The After trait can be inherited by classes representing a context where an action must be executing after the main executable action

The After trait can be inherited by classes representing a context where an action must be executing after the main executable action

Attributes

See also

Example to understand why the type T must : AsResult

Companion
object
Supertypes
trait Context
class Object
trait Matchable
class Any
Known subtypes
trait BeforeAfter
Self type
object After

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
After.type

Run a given fragment after each fragment

Run a given fragment after each fragment

Attributes

Supertypes
class Object
trait Matchable
class Any

Execute some fragments after all others

Execute some fragments after all others

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait OwnEnv

This trait can be mixed-in a specification to allow examples to have all of their expectations being evaluated (unless the example body throws an exception of course).

This trait can be mixed-in a specification to allow examples to have all of their expectations being evaluated (unless the example body throws an exception of course).

All the results are collected into a list, provided by the StoredExpectations trait. These results form then the body of the each example (decorated by a special ExampleFactory) so that each example returns a Result which is the summary of all the individual issues.

It must be noted that this trait relies on a mutable list to collect the results as they are created in the example body. Because of this restriction, a Specification using that trait must run sequentially

If the specification is not sequential we force it to be

Attributes

Supertypes
trait Expectations
trait TypedEqual
trait ResultChecks
class Object
trait Matchable
class Any
Show all
trait Around extends Context

The Around trait can be inherited by classes which will execute some code inside the around method provided by the context.

The Around trait can be inherited by classes which will execute some code inside the around method provided by the context.

This can be used for example to execute some code inside a webapp session

Attributes

See also

Example to understand why the type T must : AsResult

Companion
object
Supertypes
trait Context
class Object
trait Matchable
class Any
Self type
object Around

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Around.type

Run a function around each execution result

Run a function around each execution result

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Before extends Context

The Before trait can be inherited by classes representing a context where an action must be executing before the main executable action

The Before trait can be inherited by classes representing a context where an action must be executing before the main executable action

Attributes

See also

Example to understand why the type T must : AsResult

Companion
object
Supertypes
trait Context
class Object
trait Matchable
class Any
Known subtypes
trait BeforeAfter
Self type
object Before

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Before.type
trait BeforeAfter extends Before, After

Attributes

Companion
object
Supertypes
trait After
trait Before
trait Context
class Object
trait Matchable
class Any
Show all
Self type
object BeforeAfter

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Run a given fragment before and after each fragment

Run a given fragment before and after each fragment

Attributes

Supertypes
class Object
trait Matchable
class Any

Execute some fragments before and after all others

Execute some fragments before and after all others

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Resource[T]

Run a given fragment before each fragment

Run a given fragment before each fragment

Attributes

Supertypes
class Object
trait Matchable
class Any

Execute some fragments before all others

Execute some fragments before all others

Attributes

Supertypes
class Object
trait Matchable
class Any
trait Context

generic trait for Before, After, Around

generic trait for Before, After, Around

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait After
trait BeforeAfter
trait Around
trait Before
object Context

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Context.type
trait ForEach[T]

For each created example use a given fixture object

For each created example use a given fixture object

Attributes

Supertypes
class Object
trait Matchable
class Any

Allow a Form to be inserted among Fragments as a Text Fragment Allow a Form to be used as an example body and return a Result automatically

Allow a Form to be inserted among Fragments as a Text Fragment Allow a Form to be used as an example body and return a Result automatically

Attributes

Companion
object
Supertypes
trait PropSyntax
trait FormDsl
trait FragmentsDsl
trait ActionDsl
trait TagDsl
class Object
trait Matchable
class Any
Show all
Known subtypes
object Forms
object Forms extends Forms

Attributes

Companion
trait
Supertypes
trait Forms
trait PropSyntax
trait FormDsl
trait FragmentsDsl
trait ActionDsl
trait TagDsl
class Object
trait Matchable
class Any
Show all
Self type
Forms.type

Acquire a resource for the whole spec and release it at the end

Acquire a resource for the whole spec and release it at the end

Attributes

Supertypes
class Object
trait Matchable
class Any
Show all
trait Retries extends AroundEach

Attributes

Supertypes
trait AroundEach
class Object
trait Matchable
class Any
trait Snippets extends Snippets

Snippets of code can be extracted from interpolated specification strings.

Snippets of code can be extracted from interpolated specification strings.

When you want to specify that a piece of code must be included in the specification output, you can use the snippet method to execute a this code and use the text in the output. If you just want to output part of the code you need to delimit it with some comments // 8<------- (with as many dashes as you want)

Generally the last value of a snippet will be displayed separately but it is possible to avoid this by using the mute method on a Snippet.

It is also possible to check that the result value is equal to a specific value by using the check[R : AsResult](f: T => R) method.

Attributes

Companion
object
Supertypes
trait Snippets
class Object
trait Matchable
class Any
Known subtypes
trait Card
Self type
object Snippets

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
Snippets.type

List of all the features which are being included the default Specification class:

List of all the features which are being included the default Specification class:

  • matchers (with the expectations dsl and the most common matchers)
  • standard results
  • pending until fixed
  • implicit parameters to overload some method calls
  • .pp calls to print out some expressions

Attributes

Supertypes
Known subtypes

This trait evaluates expectations and stores them in a local variable for further usage

This trait evaluates expectations and stores them in a local variable for further usage

Attributes

Supertypes
trait Expectations
trait TypedEqual
trait ResultChecks
class Object
trait Matchable
class Any
Show all
Known subtypes

This trait allows to use Data tables with simple ! as column separator when the first column is a string. However the syntax for creating examples with a String and a ! is deactivated

This trait allows to use Data tables with simple ! as column separator when the first column is a string. However the syntax for creating examples with a String and a ! is deactivated

Attributes

Companion
object
Supertypes
trait DataTables
trait ResultChecks
class Object
trait Matchable
class Any
Show all
Known subtypes
object Tables
object Tables extends Tables, Expectations

Attributes

Companion
trait
Supertypes
trait Expectations
trait TypedEqual
trait Tables
trait DataTables
trait ResultChecks
class Object
trait Matchable
class Any
Show all
Self type
Tables.type

Deprecated classlikes

Execute a step after all other fragments

Execute a step after all other fragments

Attributes

Deprecated
[Since version 5.0.0] Use the org.specs2.specification.AfterSpec trait instead
Supertypes
class Object
trait Matchable
class Any

Execute a step before and after all other fragments

Execute a step before and after all other fragments

Attributes

Deprecated
[Since version 5.0.0] Use the org.specs2.specification.BeforeAfterSpec trait instead
Supertypes
class Object
trait Matchable
class Any

Execute a step before all other fragments

Execute a step before all other fragments

Attributes

Deprecated
[Since version 5.0.0] Use the org.specs2.specification.BeforeSpec trait instead
Supertypes
class Object
trait Matchable
class Any