Package

org.specs2

control

Permalink

package control

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. control
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Action[A] = Eff[ActionStack, A]

    Permalink
  2. case class ActionException(warnings: List[String], message: Option[String], throwable: Option[Throwable]) extends Exception with Product with Serializable

    Permalink

    This exception class is used when an Action is transformed to a Task to avoid losing information

  3. type ActionStack = FxAppend[Fx2[TimedFuture, control.eff.ErrorEffect.ErrorOrOk], Fx3[Console, Warnings, Safe]]

    Permalink
  4. type AsyncFold[A, B] = Fold[Action, A, B]

    Permalink
  5. type AsyncSink[A] = Fold[Action, A, Unit]

    Permalink
  6. type AsyncStream[A] = Producer[ActionStack, A]

    Permalink
  7. type AsyncTransducer[A, B] = (Producer[ActionStack, A]) ⇒ Producer[ActionStack, B]

    Permalink
  8. trait Debug extends ImplicitParameters

    Permalink

    This trait provides simple a way to print out any object to the console:

    This trait provides simple a way to print out any object to the console:

    "this string".pp must_== "this string"

    will print 'this string' and pass it to the rest of the expectation

  9. trait Exceptions extends AnyRef

    Permalink

    This trait provides methods to catch exceptions and transform them into values which can be passed to further computations.

    This trait provides methods to catch exceptions and transform them into values which can be passed to further computations.

    It uses the facilities found in the scala.util.control.Exception object while providing a more concise api on some use cases.

    See also

    org.specs2.control.ExceptionsSpec for examples

  10. trait ExecutionOrigin extends Stacktraces

    Permalink

    This trait is used primarily to change the junit behavior depending on the execution environment

  11. trait Functions extends AnyRef

    Permalink

    This trait provides utility methods for functions

  12. trait HasStackTrace extends AnyRef

    Permalink

    This trait describes something which has a stackTrace with:

    This trait describes something which has a stackTrace with:

    • a list of stacktrace element

    This is used to provide a common interface to execute.Failure and execute.Error

  13. trait ImplicitParameters extends AnyRef

    Permalink

    This trait is used to abuse method overloading and allow some of the methods in specs2 DSL to be applicable to various parameters.

    This trait is used to abuse method overloading and allow some of the methods in specs2 DSL to be applicable to various parameters.

    For example in a mutable specification, the >> method is overloaded for lots of different arguments:

    • result
    • function of the Environment
    • function of the Command line
    • ...
  14. case class IncludeExcludeStackTraceFilter(include: Seq[String], exclude: Seq[String]) extends StackTraceFilter with Product with Serializable

    Permalink

    Implementation of the StackTraceFilter trait with a list of include/exclude patterns

  15. trait LanguageFeatures extends AnyRef

    Permalink

    implicits and postfix ops are automatically mixed in specs2 specifications for convenience.

    implicits and postfix ops are automatically mixed in specs2 specifications for convenience. If you *really* don't want that you can override this behaviour by using the NoLanguageFeatures trait

  16. class LazyParameter[+T] extends AnyRef

    Permalink

    class holding a value to be evaluated lazily

  17. trait LazyParameters extends AnyRef

    Permalink

    This trait can be used to allow some function to be called with varargs, with values being evaluated lazily:

    This trait can be used to allow some function to be called with varargs, with values being evaluated lazily:

    def method[T](values: LazyParameter[T]*) = {
      values.toStream // use the toStream method to consume the values lazily
    }
    // usage
    method(exp1, exp2, exp3)

    Note that the values are really evaluated once, unlike a by-name parameter.

  18. case class LazyValue[T](t: () ⇒ T) extends Product with Serializable

    Permalink

    This class simply encapsulates a lazy value which will be only evaluated once

    This class simply encapsulates a lazy value which will be only evaluated once

    See also

    org.specs2.specification.process.RandomSequentialExecution for an example of use

  19. type Logger = (String) ⇒ Unit

    Permalink

    Actions logging

  20. case class NamedThreadFactory(namePrefix: String, group: ThreadGroup = Thread.currentThread.getThreadGroup, priority: Int = Thread.currentThread.getPriority) extends ThreadFactory with Product with Serializable

    Permalink

    This factory creates named threads which can be prefixed by "specs2" to track the threads used by specs2 for the specification execution

    This factory creates named threads which can be prefixed by "specs2" to track the threads used by specs2 for the specification execution

    Contributed by @jedws

  21. trait NoDebug extends Debug

    Permalink

    Use this trait to disable the pp method on objects

  22. trait NoLanguageFeatures extends LanguageFeatures

    Permalink
  23. trait NoNumberOfTimes extends NumberOfTimes

    Permalink
  24. trait NumberOfTimes extends AnyRef

    Permalink

    Syntactic sugar to execute an action a given number of times

  25. type Operation[A] = Eff[OperationStack, A]

    Permalink
  26. type OperationStack = FxAppend[Fx1[control.eff.ErrorEffect.ErrorOrOk], Fx3[Console, Warnings, Safe]]

    Permalink
  27. trait Properties extends AnyRef

    Permalink
  28. case class Property[T](value: () ⇒ Option[T], evaluated: Boolean = false, evaluatedValue: Option[T] = None) extends Product with Serializable

    Permalink

    This class represents values which are evaluated lazily and which may even be missing.

    This class represents values which are evaluated lazily and which may even be missing.

    It has Option-like function and can be also converted to an Either object

  29. trait StackTraceFilter extends AnyRef

    Permalink

    This trait filters an Exception stacktrace

  30. trait Stacktraces extends AnyRef

    Permalink

    Utility methods to determine the origin of the execution of the current code

  31. trait Throwablex extends AnyRef

    Permalink

    This trait adds some utility methods to Throwable objects.

  32. case class Times(n: Int) extends Product with Serializable

    Permalink
  33. case class TraceLocation(path: String, fileName: String, className: String, methodName: String, lineNumber: Int) extends Product with Serializable

    Permalink
  34. case class UserException(message: String, throwable: Throwable) extends Exception with Product with Serializable

    Permalink

    This exception class is used to notify the user of instantiation errors

  35. implicit class actionOps[T] extends AnyRef

    Permalink
  36. implicit class ioOperationToOption[T] extends AnyRef

    Permalink
  37. implicit class operationOps[T] extends AnyRef

    Permalink

Value Members

  1. object Actions

    Permalink
  2. object Debug extends Debug

    Permalink
  3. object DefaultStackTraceFilter extends IncludeExcludeStackTraceFilter with ExecutionOrigin

    Permalink

    default filter for specs2 runs

  4. object Exceptions extends Exceptions

    Permalink
  5. object Executable

    Permalink

    Execute external commands

  6. object ExecutionOrigin extends ExecutionOrigin

    Permalink
  7. object Functions extends Functions

    Permalink
  8. object FutureInstances

    Permalink
  9. object ImplicitParameters extends ImplicitParameters

    Permalink
  10. object IncludeExcludeStackTraceFilter extends Serializable

    Permalink

    Factory object to build a stack trace filter from include/exclude expressions:

    Factory object to build a stack trace filter from include/exclude expressions:

    .*specs2 ==> include .*specs2 traces .*specs2/scala.* ==> include .*specs2 traces, exclude scala.* traces .*specs2,scala/scalaz,eclipse ==> include .*specs2,scala traces, exclude scalaz and eclipse traces

  11. object LazyParameters extends LazyParameters

    Permalink
  12. object NoStackTraceFilter extends StackTraceFilter

    Permalink

    This filter doesn't do anything

  13. object NumberOfTimes extends NumberOfTimes

    Permalink
  14. object Operations

    Permalink
  15. object Properties extends Properties

    Permalink
  16. object Property extends Serializable

    Permalink

    Companion object to create properties with possibly no initial value

  17. object StackTraceFilter

    Permalink
  18. object Stacktraces extends Stacktraces

    Permalink
  19. object Throwables

    Permalink
  20. object Throwablex extends Throwablex

    Permalink
  21. object TraceLocation extends Serializable

    Permalink
  22. object Use

    Permalink

    Utility object to show a parameter as used In particular this is useful to avoid warnings with ImplicitParameters

  23. def attemptExecuteOperation[A](operation: Operation[A], printer: (String) ⇒ Unit = s => ()): Either[Throwable, (Either[control.eff.ErrorEffect.Error, A], List[String])]

    Permalink
  24. lazy val consoleLogging: (String) ⇒ Unit

    Permalink
  25. package eff

    Permalink
  26. def emitAsync[A](as: A*): AsyncStream[A]

    Permalink
  27. def emitAsyncDelayed[A](a: A): AsyncStream[A]

    Permalink
  28. def executeOperation[A](operation: Operation[A], printer: (String) ⇒ Unit = s => ()): (Either[control.eff.ErrorEffect.Error, A], List[String])

    Permalink
  29. implicit val idToAction: NaturalTransformation[Id, Action]

    Permalink
  30. lazy val noLogging: (String) ⇒ Unit

    Permalink
  31. implicit def operationAsResult[T](implicit arg0: AsResult[T]): AsResult[Operation[T]]

    Permalink

    This implicit allows an Operation[result] to be used inside an example.

  32. implicit def operationToAction[A](operation: Operation[A]): Action[A]

    Permalink
  33. implicit def operationToActionNat[A]: ~>[Operation, Action]

    Permalink
  34. package origami

    Permalink
  35. package producer

    Permalink
  36. def runOperation[A](operation: Operation[A], printer: (String) ⇒ Unit = s => ()): Either[control.eff.ErrorEffect.Error, A]

    Permalink
  37. def warnAndFail[R, A](message: String, failureMessage: String)(implicit m1: <=[Warnings, R], m2: <=[control.eff.ErrorEffect.ErrorOrOk, R]): Eff[R, A]

    Permalink

    warn the user about something that is probably wrong on his side, this is not a specs2 bug, then fail to stop all further computations

Inherited from AnyRef

Inherited from Any

Ungrouped