Env

org.specs2.specification.core.Env
See theEnv companion object
case class Env(arguments: Arguments, resources: Resources, systemLogger: Logger, printerLogger: PrinterLogger, statisticsRepository: StatisticsRepository, random: Random, fileSystem: FileSystem, 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 awaitShutdown(): Unit

be sure to only call this method on the JVM!

be sure to only call this method on the JVM!

Attributes

def setArguments(args: Arguments): Env

set new arguments

set new arguments

Attributes

def setContextClassLoader(): Unit

if a custom classloader is used, give the possibility to set it as the context class loader This is used during the execution of fragments. See Execution.scala

if a custom classloader is used, give the possibility to set it as the context class loader This is used during the execution of fragments. See Execution.scala

Attributes

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

set new PrinterLogger

set new PrinterLogger

Attributes

set a new statistic repository

set a new statistic repository

Attributes

def setSystemLogger(logger: Logger): Env

set new system logger

set new system logger

Attributes

def setTimeout(duration: FiniteDuration): Env
def shutdown: Future[List[Result]]

Attributes

Returns

a list of finalization failures by resource key if any

def shutdownResult: Future[Result]

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 defaultInstances: List[AnyRef]
lazy val executionContext: ExecutionContext
lazy val executorServices: ExecutorServices
lazy val specs2ExecutionContext: ExecutionContext
lazy val specs2ExecutorServices: ExecutorServices
lazy val timeout: Option[FiniteDuration]