Trait

org.specs2.specification

AllExpectations

Related Doc: package specification

Permalink

trait AllExpectations extends StoredExpectations with FragmentsFactory with SpecificationStructure with ArgumentsCreation

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.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AllExpectations
  2. ArgumentsCreation
  3. SpecificationStructure
  4. ContextualSpecificationStructure
  5. FragmentsFactory
  6. StoredExpectations
  7. Expectations
  8. ExpectationsDescription
  9. TypedEqual
  10. ExpectationsCreation
  11. MatchResultStackTrace
  12. AnyRef
  13. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. class Descriptible[T] extends AnyRef

    Permalink
    Definition Classes
    ExpectationsDescription
  2. class ExpectationDescription extends AnyRef

    Permalink
    Definition Classes
    ExpectationsDescription
  3. class TypedEqualExpectation[T] extends AnyRef

    Permalink
    Definition Classes
    TypedEqual

Abstract Value Members

  1. abstract def is: SpecStructure

    Permalink
    Definition Classes
    SpecificationStructure

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addLocation(message: String, location: String): String

    Permalink
    Definition Classes
    StoredExpectations
  5. def args(ex: ArgProperty[String] = ArgProperty[String](), include: ArgProperty[String] = ArgProperty[String](), exclude: ArgProperty[String] = ArgProperty[String](), was: ArgProperty[String] = ArgProperty[String](), plan: ArgProperty[Boolean] = ArgProperty[Boolean](), skipAll: ArgProperty[Boolean] = ArgProperty[Boolean](), stopOnFail: ArgProperty[Boolean] = ArgProperty[Boolean](), stopOnSkip: ArgProperty[Boolean] = ArgProperty[Boolean](), sequential: ArgProperty[Boolean] = ArgProperty[Boolean](), asap: ArgProperty[Boolean] = ArgProperty[Boolean](), isolated: ArgProperty[Boolean] = ArgProperty[Boolean](), xonly: ArgProperty[Boolean] = ArgProperty[Boolean](), showOnly: ArgProperty[String] = ArgProperty[String](), color: ArgProperty[Boolean] = ArgProperty[Boolean]()): Arguments

    Permalink

    shorthand method to create an Arguments object

    shorthand method to create an Arguments object

    Definition Classes
    ArgumentsCreation
  6. lazy val args: ArgumentsNamespace

    Permalink
    Definition Classes
    ArgumentsCreation
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def checkFailure[T](m: MatchResult[T]): MatchResult[T]

    Permalink

    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

    Attributes
    protected
    Definition Classes
    ExpectationsCreation
  9. def checkMatchResultFailure[T](m: MatchResult[T]): MatchResult[T]

    Permalink

    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

    Attributes
    protected
    Definition Classes
    StoredExpectationsExpectationsCreation
  10. def checkResultFailure(r: ⇒ Result): Result

    Permalink

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

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

    Attributes
    protected
    Definition Classes
    ExpectationsCreation
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def createExpectable[T](t: ⇒ T, alias: Option[(String) ⇒ String]): Expectable[T]

    Permalink

    returns

    an Expectable with a description function

    Definition Classes
    ExpectationsCreation
  13. def createExpectable[T](t: ⇒ T, alias: (String) ⇒ String): Expectable[T]

    Permalink

    returns

    an Expectable with a description function

    Definition Classes
    ExpectationsCreation
  14. def createExpectable[T](t: ⇒ T, alias: ⇒ String): Expectable[T]

    Permalink

    returns

    an Expectable with a description

    Definition Classes
    ExpectationsCreation
  15. def createExpectable[T](t: ⇒ T): Expectable[T]

    Permalink

    returns

    an Expectable

    Definition Classes
    ExpectationsCreation
  16. def createExpectableWithShowAs[T](t: ⇒ T, showAs: ⇒ String): Expectable[T]

    Permalink

    returns

    an Expectable with a function to show the element T

    Definition Classes
    ExpectationsCreation
  17. def decorate(is: SpecStructure, env: Env): SpecStructure

    Permalink
    Definition Classes
    SpecificationStructure
  18. implicit def describe[T](t: ⇒ T): Descriptible[T]

    Permalink

    describe a value with the aka method

    describe a value with the aka method

    Definition Classes
    ExpectationsDescription
  19. implicit def describeExpectation(description: String): ExpectationDescription

    Permalink
    Definition Classes
    ExpectationsDescription
  20. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  22. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  23. implicit def fragmentFactory: FragmentFactory

    Permalink

    returns

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

    Definition Classes
    AllExpectationsFragmentsFactory
  24. def fragments: (Env) ⇒ Fragments

    Permalink
  25. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  26. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  27. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  28. def map(structure: SpecStructure): SpecStructure

    Permalink

    modify the specification structure

    modify the specification structure

    Definition Classes
    AllExpectationsSpecificationStructure
  29. def map(fs: ⇒ Fragments, env: Env): Fragments

    Permalink

    modify the fragments, using the current environment

    modify the fragments, using the current environment

    Definition Classes
    SpecificationStructure
  30. def map(fs: ⇒ Fragments): Fragments

    Permalink

    modify the fragments

    modify the fragments

    Definition Classes
    SpecificationStructure
  31. def mapMatchResult[T](m: MatchResult[T]): MatchResult[T]

    Permalink

    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

    Attributes
    protected
    Definition Classes
    ExpectationsCreation
  32. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  33. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. def resultsContext(results: ⇒ Seq[Result]): Context

    Permalink

    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

  36. def sandboxMatchResult[T](mr: ⇒ MatchResult[T]): MatchResult[T]

    Permalink

    returns

    the match result without any side-effects

    Definition Classes
    StoredExpectationsExpectationsCreation
  37. def setStacktrace[T](m: MatchResult[T]): MatchResult[T]

    Permalink

    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

    Attributes
    protected
    Definition Classes
    MatchResultStackTrace
  38. def storedResults: Seq[Result]

    Permalink
    Definition Classes
    StoredExpectations
  39. def structure: (Env) ⇒ SpecStructure

    Permalink
  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  41. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  42. implicit def typedEqualExpectation[T](t: ⇒ T): TypedEqualExpectation[T]

    Permalink

    A value can be tested against another with the === operator.

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

    Definition Classes
    TypedEqual
  43. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ArgumentsCreation

Inherited from SpecificationStructure

Inherited from FragmentsFactory

Inherited from StoredExpectations

Inherited from Expectations

Inherited from ExpectationsDescription

Inherited from TypedEqual

Inherited from ExpectationsCreation

Inherited from MatchResultStackTrace

Inherited from AnyRef

Inherited from Any

Ungrouped