org.specs2.matcher

ThrownExpectations

trait ThrownExpectations extends Expectations with StandardResults with StandardMatchResults

Thrown expectations will throw a FailureException if a match fails

This trait can be extended to be used in another framework like ScalaTest:

trait ScalaTestExpectations extends ThrownExpectations { override protected def checkFailure[T](m: =>MatchResult[T]) = { m match { case f @ MatchFailure(ok, ko, _, _) => throw new TestFailedException(f.message, f.exception, 0) case _ => () } m } }

Linear Supertypes
StandardMatchResults, StandardResults, Expectations, CanBeEqual, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ThrownExpectations
  2. StandardMatchResults
  3. StandardResults
  4. Expectations
  5. CanBeEqual
  6. AnyRef
  7. 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
  3. implicit class pendingResult extends AnyRef

    Definition Classes
    StandardResults
  4. implicit class skippedResult extends AnyRef

    Definition Classes
    StandardResults

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 anError: Error

    Definition Classes
    ThrownExpectations → StandardResults
  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. 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
  7. 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
  8. def checkMatchResultFailure[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
    ThrownExpectationsExpectations
  9. 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
    ThrownExpectationsExpectations
  10. def clone(): AnyRef

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

    returns

    an Expectable with a description function

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

    returns

    an Expectable with a description function

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

    returns

    an Expectable with a description

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

    returns

    an Expectable

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

    returns

    an Expectable with a function to show the element T

    Definition Classes
    ThrownExpectationsExpectations
  16. 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
  17. def done: Success

    Definition Classes
    StandardResults
  18. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  20. def failure(f: Failure): Failure

    Attributes
    protected
  21. def failure(m: String): Failure

    Attributes
    protected
  22. def failure: Failure

    Definition Classes
    ThrownExpectations → StandardResults
  23. def finalize(): Unit

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

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

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

    Definition Classes
    Any
  27. def ko(m: String): MatchFailure[None.type]

    Definition Classes
    StandardMatchResults
  28. lazy val ko: MatchFailure[None.type]

  29. def mapMatchResult[T](m: MatchResult[T]): MatchResult[T]

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

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

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

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

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

    Definition Classes
    AnyRef
  33. def ok(m: String): MatchSuccess[None.type]

    Definition Classes
    StandardMatchResults
  34. lazy val ok: MatchSuccess[None.type]

    Definition Classes
    StandardMatchResults
  35. def pending(s: Pending): Pending

    Attributes
    protected
  36. def pending(m: String): Pending

    Definition Classes
    ThrownExpectations → StandardResults
  37. def pending: Pending

    Definition Classes
    ThrownExpectations → StandardResults
  38. def pending[R](r: ⇒ R)(implicit arg0: AsResult[R]): Pending

    Definition Classes
    StandardResults
  39. def skipped(s: Skipped): Skipped

    Attributes
    protected
  40. def skipped(m: String): Skipped

    Definition Classes
    ThrownExpectations → StandardResults
  41. def skipped: Skipped

    Definition Classes
    ThrownExpectations → StandardResults
  42. def skipped[R](r: ⇒ R)(implicit arg0: AsResult[R]): Skipped

    Definition Classes
    StandardResults
  43. def success(m: String): Success

    Attributes
    protected
  44. lazy val success: Success

    Definition Classes
    ThrownExpectations → StandardResults
  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  46. def toString(): String

    Definition Classes
    AnyRef → Any
  47. def todo: Pending

    Definition Classes
    ThrownExpectations → StandardResults
  48. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. def wontdo: Success

    Definition Classes
    StandardResults

Inherited from StandardMatchResults

Inherited from StandardResults

Inherited from Expectations

Inherited from CanBeEqual

Inherited from AnyRef

Inherited from Any

Ungrouped