org.specs2.specification

AllExpectations

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. Hide All
  2. Show all
  1. AllExpectations
  2. ArgumentsArgs
  3. ArgProperties
  4. SpecificationStructure
  5. ExamplesFactory
  6. StoredExpectations
  7. Expectations
  8. CanBeEqual
  9. AnyRef
  10. Any
Visibility
  1. Public
  2. All

Type Members

  1. class CanBeEqualExpectation [T] extends AnyRef

  2. class Descriptible [T] extends AnyRef

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

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

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. implicit def anyToArgProperty [T] (t: ⇒ T): ArgProperty[T]

    Attributes
    implicit
    Definition Classes
    ArgProperties
  7. 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](), isolated: ArgProperty[Boolean] = ArgProperty[Boolean](), xonly: ArgProperty[Boolean] = ArgProperty[Boolean](), showOnly: ArgProperty[String] = ArgProperty[String](), color: ArgProperty[Boolean] = ArgProperty[Boolean](), noindent: ArgProperty[Boolean] = ArgProperty[Boolean](), markdown: ArgProperty[Boolean] = ArgProperty[Boolean]()): Arguments

    shorthand method to create an Arguments object

    shorthand method to create an Arguments object

    Definition Classes
    ArgumentsArgs
  8. lazy val args : ArgumentsNamespace

    Definition Classes
    ArgumentsArgs
  9. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  10. 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

    Attributes
    implicit
    Definition Classes
    CanBeEqual
  11. def checkFailure [T] (m: MatchResult[T]): MatchResult[T]

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

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

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

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

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

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

    Attributes
    protected[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

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

    Attributes
    final
    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

    Attributes
    implicit
    Definition Classes
    AllExpectations → ExamplesFactory
  23. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  24. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  25. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  26. def is : 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
    AllExpectations → SpecificationStructure
  27. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  28. def map (fs: ⇒ Fragments): Fragments

    this method can be overriden to map additional behavior in the user-defined fragments

    this method can be overriden to map additional behavior in the user-defined fragments

    Definition Classes
    SpecificationStructure
  29. def matchResultToResult [T] (m: MatchResult[T]): Result

    returns

    a Result having its location as part of its message

    Attributes
    protected
    Definition Classes
    AllExpectations → Expectations
  30. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  31. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  32. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  33. 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 overriden to filter the captured results and remove the skipped results for example

  34. def storedResults : Seq[Result]

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

    Attributes
    final
    Definition Classes
    AnyRef
  36. def toString (): String

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from ArgumentsArgs

Inherited from ArgProperties

Inherited from SpecificationStructure

Inherited from ExamplesFactory

Inherited from StoredExpectations

Inherited from Expectations

Inherited from CanBeEqual

Inherited from AnyRef

Inherited from Any