org.specs2.specification

AllExpectations

Related Doc: package specification

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
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
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class CanBeEqualExpectation[T] extends AnyRef

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

    Definition Classes
    Expectations

Abstract Value Members

  1. abstract def is: Fragments

    declaration of Fragments from the user

    declaration of Fragments from the user

    Definition Classes
    SpecificationStructure

Concrete Value Members

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

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

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

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

    Definition Classes
    StoredExpectations
  5. implicit def anyToArgProperty[T](t: ⇒ T): ArgProperty[T]

    Definition Classes
    ArgProperties
  6. def args(ex: ArgProperty[String] = ArgProperty[String](), include: ArgProperty[String] = ArgProperty[String](), exclude: ArgProperty[String] = ArgProperty[String](), wasIssue: ArgProperty[Boolean] = ArgProperty[Boolean](), 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](), random: ArgProperty[Boolean] = ArgProperty[Boolean](), xonly: ArgProperty[Boolean] = ArgProperty[Boolean](), showOnly: ArgProperty[String] = ArgProperty[String](), color: ArgProperty[Boolean] = ArgProperty[Boolean]()): Arguments

    shorthand method to create an Arguments object

    shorthand method to create an Arguments object

    Definition Classes
    ArgumentsArgs
  7. lazy val args: ArgumentsNamespace

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

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

    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
    CanBeEqual
  10. 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

    Attributes
    protected
    Definition Classes
    Expectations
  11. def checkMatchResultFailure[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

    Attributes
    protected
    Definition Classes
    StoredExpectationsExpectations
  12. def checkResultFailure(r: ⇒ Result): Result

    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
    Expectations
  13. def clone(): AnyRef

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

    returns

    an Expectable with a description function

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

    returns

    an Expectable with a description function

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

    returns

    an Expectable with a description

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

    returns

    an Expectable

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

    returns

    an Expectable with a function to show the element T

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

    describe a value with the aka method

    describe a value with the aka method

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

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

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

    returns

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

    Definition Classes
    AllExpectationsExamplesFactory
  23. def finalize(): Unit

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

    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[_]

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

    Definition Classes
    AnyRef → Any
  27. def identification: SpecIdentification

    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

    automatically convert a specification to its identification

    automatically convert a specification to its identification

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

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

    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]

    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
    Expectations
  32. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  35. 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

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

    returns

    the match result without any side-effects

    Definition Classes
    StoredExpectationsExpectations
  37. 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

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

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

    Definition Classes
    AnyRef
  40. def toString(): String

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

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

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

    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