Trait

org.specs2.specification

AllExpectations

Related Doc: package specification

Permalink

trait AllExpectations extends StoredExpectations with ExamplesFactory with SpecificationStructure with ArgumentsArgs

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
ArgumentsArgs, ArgProperties, SpecificationStructure, DefaultFragmentsFormatting, TagsAssociation, FragmentsFormatting, ExamplesFactory, StoredExpectations, Expectations, MatchResultStackTrace, CanBeEqual, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AllExpectations
  2. ArgumentsArgs
  3. ArgProperties
  4. SpecificationStructure
  5. DefaultFragmentsFormatting
  6. TagsAssociation
  7. FragmentsFormatting
  8. ExamplesFactory
  9. StoredExpectations
  10. Expectations
  11. MatchResultStackTrace
  12. CanBeEqual
  13. AnyRef
  14. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. class CanBeEqualExpectation[T] extends AnyRef

    Permalink
    Definition Classes
    CanBeEqual
  2. class Descriptible[T] extends AnyRef

    Permalink
    Definition Classes
    Expectations

Abstract Value Members

  1. abstract def is: Fragments

    Permalink

    declaration of Fragments from the user

    declaration of Fragments from the user

    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. implicit def anyToArgProperty[T](t: ⇒ T): ArgProperty[T]

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

    Permalink
    Definition Classes
    ArgumentsArgs
  7. lazy val args: ArgumentsNamespace

    Permalink
    Definition Classes
    ArgumentsArgs
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. implicit def canBeEqual[T](t: ⇒ T): CanBeEqualExpectation[T]

    Permalink
    Definition Classes
    CanBeEqual
  10. def checkFailure[T](m: MatchResult[T]): MatchResult[T]

    Permalink
    Attributes
    protected
    Definition Classes
    Expectations
  11. def checkMatchResultFailure[T](m: MatchResult[T]): MatchResult[T]

    Permalink
    Attributes
    protected
    Definition Classes
    StoredExpectations → Expectations
  12. def checkResultFailure(r: ⇒ Result): Result

    Permalink
    Attributes
    protected
    Definition Classes
    Expectations
  13. def clone(): AnyRef

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

    Permalink
    Definition Classes
    Expectations
  15. def createExpectable[T](t: ⇒ T, alias: (String) ⇒ String): Expectable[T]

    Permalink
    Definition Classes
    Expectations
  16. def createExpectable[T](t: ⇒ T, alias: ⇒ String): Expectable[T]

    Permalink
    Definition Classes
    Expectations
  17. def createExpectable[T](t: ⇒ T): Expectable[T]

    Permalink
    Definition Classes
    Expectations
  18. def createExpectableWithShowAs[T](t: ⇒ T, showAs: ⇒ String): Expectable[T]

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. implicit def exampleFactory: ExampleFactory

    Permalink

    returns

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

    Definition Classes
    AllExpectationsExamplesFactory
  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def formatFragments: (Fragments) ⇒ Fragments

    Permalink

    format a list of fragments according to their formatting tags

    format a list of fragments according to their formatting tags

    Definition Classes
    DefaultFragmentsFormattingFragmentsFormatting
  25. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  27. def identification: SpecIdentification

    Permalink

    specName provides useful information identifying the specification: title, className, url...

    specName provides useful information identifying the specification: title, className, url...

    Definition Classes
    SpecificationStructure
  28. implicit def identifySpecificationStructure(s: SpecificationStructure): SpecIdentification

    Permalink

    automatically convert a specification to its identification

    automatically convert a specification to its identification

    Definition Classes
    SpecificationStructure
  29. final def isInstanceOf[T0]: Boolean

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

    Permalink

    we force the specification to be isolated if it's not sequential or already isolated.

    we force the specification to be isolated if it's not sequential or already isolated. this is important because when an example runs, its results are being stored into a shared list

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

    Permalink
    Attributes
    protected
    Definition Classes
    Expectations
  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
    Definition Classes
    StoredExpectations → Expectations
  37. def setStacktrace[T](m: MatchResult[T]): MatchResult[T]

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

    Permalink
    Definition Classes
    StoredExpectations
  39. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  41. final def wait(): Unit

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

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

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

Inherited from ArgumentsArgs

Inherited from ArgProperties

Inherited from SpecificationStructure

Inherited from TagsAssociation

Inherited from FragmentsFormatting

Inherited from ExamplesFactory

Inherited from StoredExpectations

Inherited from Expectations

Inherited from MatchResultStackTrace

Inherited from CanBeEqual

Inherited from AnyRef

Inherited from Any

Ungrouped