Env

org.specs2.specification.core.Env
See theEnv companion object
case class Env(arguments: Arguments, systemLogger: Logger, selectorInstance: Arguments => Selector, executorInstance: Arguments => Executor, lineLogger: LineLogger, statsRepository: Arguments => StatisticsRepository, random: Random, fileSystem: FileSystem, executionParameters: ExecutionParameters, customClassLoader: Option[ClassLoader], classLoading: ClassLoading, executionEnv: ExecutionEnv, specs2ExecutionEnv: ExecutionEnv)

Whole creation / execution / reporting environment for a specification

Part of it is driven by the command-line, part of it is specs2 implementation Yet it can be used to drive the creation or execution of examples

Note: creating an Env instance is a delicate activity because the Env hold a thread pool that needs to be shutdown at the end of the execution

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def defaultInstances: List[AnyRef]
def executionContext: ExecutionContext
def executorServices: ExecutorServices
def setArguments(args: Arguments): Env

set new arguments

set new arguments

Attributes

def setContextClassLoader(): Unit
def setCustomClassLoader(classLoader: ClassLoader): Env

set a new classloader to be used as the context classloader for each execution

set a new classloader to be used as the context classloader for each execution

Attributes

def setLineLogger(logger: LineLogger): Env

set new LineLogger

set new LineLogger

Attributes

set a new statistic repository

set a new statistic repository

Attributes

def setSystemLogger(logger: String => Unit): Env

set new system logger

set new system logger

Attributes

def setTimeout(duration: FiniteDuration): Env

Attributes

Returns

an isolated env

Attributes

Returns

a non isolated env

def shutdown(): Unit
def specs2ExecutionContext: ExecutionContext

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

lazy val commandLine: CommandLine
lazy val executor: Executor
lazy val selector: Selector
lazy val timeout: Option[FiniteDuration]