AllExpectations

trait AllExpectations extends StoredExpectations with FragmentsFactory with SpecificationStructure with ArgumentsCreation with StandardResults

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 can either run sequentially or isolated.

If the specification is neither sequential or isolated, we force it to be isolated by default.

trait StandardResults
trait ArgumentsCreation
trait StoredExpectations
trait StoredResults
trait Expectations
trait ExpectationsDescription
trait TypedEqual
trait ExpectationsCreation
trait MatchResultStackTrace
class Object
trait Matchable
class Any

Type members

Inherited classlikes

class Descriptible[T](value: => T)
class ExpectationDescription(description: String)
class TypedEqualExpectation[T](t: => T)
Inherited from:
TypedEqual

Value members

Concrete methods

override def anError: Error

use a side-effect to register a standard result

use a side-effect to register a standard result

Definition Classes
StandardResults
override def failure(message: String): Failure

use a side-effect to register a standard result

use a side-effect to register a standard result

Definition Classes
StandardResults
override def map(structure: SpecStructure): SpecStructure

modify the specification structure

modify the specification structure

Definition Classes
def resultsContext(results: => Seq[Result]): Context

create a new Context with the list of captured results.

create a new Context with the list of captured results.

This method could be overridden to filter the captured results and remove the skipped results for example

override def skipped(message: String): Skipped

use a side-effect to register a standard result

use a side-effect to register a standard result

Definition Classes
StandardResults

Inherited methods

def addLocation(message: String, location: String): String
Inherited from:
StoredExpectations
def args(ex: ArgProperty[String], include: ArgProperty[String], exclude: ArgProperty[String], was: ArgProperty[String], plan: ArgProperty[Boolean], skipAll: ArgProperty[Boolean], stopOnFail: ArgProperty[Boolean], stopOnError: ArgProperty[Boolean], stopOnIssue: ArgProperty[Boolean], stopOnSkip: ArgProperty[Boolean], sequential: ArgProperty[Boolean], batchSize: ArgProperty[Int], asap: ArgProperty[Boolean], isolated: ArgProperty[Boolean], xonly: ArgProperty[Boolean], showOnly: ArgProperty[String], color: ArgProperty[Boolean]): Arguments

shorthand method to create an Arguments object

shorthand method to create an Arguments object

Inherited from:
ArgumentsCreation
protected def checkFailure[T](m: MatchResult[T]): MatchResult[T]

this method can be overridden to throw exceptions when checking the match result

this method can be overridden to throw exceptions when checking the match result

Inherited from:
ExpectationsCreation
override protected def checkMatchResultFailure[T](m: MatchResult[T]): MatchResult[T]
Definition Classes
StoredExpectations -> ExpectationsCreation
Inherited from:
StoredExpectations
override protected def checkResultFailure(r: => Result): Result
Definition Classes
StoredExpectations -> ExpectationsCreation
Inherited from:
StoredExpectations
def createExpectable[T](t: => T, alias: Option[String => String]): Expectable[T]
Returns:

an Expectable with a description function

Inherited from:
ExpectationsCreation
def createExpectable[T](t: => T, alias: String => String): Expectable[T]
Returns:

an Expectable with a description function

Inherited from:
ExpectationsCreation
def createExpectable[T](t: => T, alias: => String): Expectable[T]
Returns:

an Expectable with a description

Inherited from:
ExpectationsCreation
def createExpectable[T](t: => T): Expectable[T]
Returns:

an Expectable

Inherited from:
ExpectationsCreation
def createExpectableWithShowAs[T](t: => T, showAs: => String): Expectable[T]
Returns:

an Expectable with a function to show the element T

Inherited from:
ExpectationsCreation
def done: Success
Inherited from:
StandardResults
def failure: Failure
Inherited from:
StandardResults
def map(fs: => Fragments, env: Env): Fragments

modify the fragments, using the current environment

modify the fragments, using the current environment

Inherited from:
SpecificationStructure
def map(fs: => Fragments): Fragments

modify the fragments

modify the fragments

Inherited from:
SpecificationStructure
protected def mapMatchResult[T](m: MatchResult[T]): MatchResult[T]

this method can be overridden to intercept a MatchResult and change its message before it is thrown

this method can be overridden to intercept a MatchResult and change its message before it is thrown

Inherited from:
ExpectationsCreation
def pending[R : AsResult](r: => R): Pending
Inherited from:
StandardResults
def pending: Pending
Inherited from:
StandardResults
def pending(message: String): Pending
Inherited from:
StandardResults
override def sandboxMatchResult[T](mr: => MatchResult[T]): MatchResult[T]
Definition Classes
StoredExpectations -> ExpectationsCreation
Inherited from:
StoredExpectations
protected def setStacktrace[T](m: MatchResult[T]): MatchResult[T]

this method can be overridden to avoid filling-in a stacktrace indicating the location of the result

this method can be overridden to avoid filling-in a stacktrace indicating the location of the result

Inherited from:
MatchResultStackTrace
def skipped[R : AsResult](r: => R): Skipped
Inherited from:
StandardResults
def skipped: Skipped
Inherited from:
StandardResults
def storedResults: Seq[Result]
Inherited from:
StoredExpectations
def success: Success
Inherited from:
StandardResults
def todo: Pending
Inherited from:
StandardResults
def wontdo: Success
Inherited from:
StandardResults

Inherited fields

lazy val args: ArgumentsNamespace
Inherited from:
ArgumentsCreation

Implicits

Implicits

implicit override protected def fragmentFactory: FragmentFactory
Returns:

an example factory which will take the stored results and make them the example result

Definition Classes

Inherited implicits

implicit def describe[T](t: => T): Descriptible[T]

describe a value with the aka method

describe a value with the aka method

Inherited from:
ExpectationsDescription
implicit def describeExpectation(description: String): ExpectationDescription
Inherited from:
ExpectationsDescription
implicit def typedEqualExpectation[T](t: => T): TypedEqualExpectation[T]

A value can be tested against another with the === operator. It is equivalent to writing a must_== b

A value can be tested against another with the === operator. It is equivalent to writing a must_== b

Inherited from:
TypedEqual