org.specs2.specification
Type members
Classlikes
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
- See also:
Example to understand why the type T must : AsResult
- Companion:
- object
Run a given fragment after each fragment
Run a given fragment after each fragment
Execute some fragments after all others
Execute some fragments after all others
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
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
- See also:
Example to understand why the type T must : AsResult
- Companion:
- object
Run a function around each execution result
Run a function around each execution result
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
- See also:
Example to understand why the type T must : AsResult
- Companion:
- object
Run a given fragment before and after each fragment
Run a given fragment before and after each fragment
Execute some fragments before and after all others
Execute some fragments before and after all others
Run a given fragment before each fragment
Run a given fragment before each fragment
Execute some fragments before all others
Execute some fragments before all others
generic trait for Before, After, Around
generic trait for Before, After, Around
- Companion:
- object
For each created example use a given fixture object
For each created example use a given fixture object
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
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.
- Companion:
- object
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
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
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
- Companion:
- object
Deprecated classlikes
Execute a step after all other fragments
Execute a step after all other fragments
- Deprecated
[Since version 5.0.0]
Use the org.specs2.specification.AfterSpec trait instead
Execute a step before and after all other fragments
Execute a step before and after all other fragments
- Deprecated
[Since version 5.0.0]
Use the org.specs2.specification.BeforeAfterSpec trait instead
Execute a step before all other fragments
Execute a step before all other fragments
- Deprecated
[Since version 5.0.0]
Use the org.specs2.specification.BeforeSpec trait instead