SpecVersionSpecific

trait SpecVersionSpecific[-R, +E]
class Object
trait Matchable
class Any
class Spec[R, E]
Spec[R, E]

Value members

Concrete methods

inline def provide[E1 >: E](inline layer: ZLayer[_, E1, _]*): Spec[Any, E1]

Automatically assembles a layer for the spec, translating it up a level.

Automatically assembles a layer for the spec, translating it up a level.

inline def provideShared[E1 >: E](inline layer: ZLayer[_, E1, _]*): Spec[Any, E1]

Automatically assembles a layer for the spec, sharing services between all tests.

Automatically assembles a layer for the spec, sharing services between all tests.

Deprecated methods

inline def provideCustom[E1 >: E](inline layer: ZLayer[_, E1, _]*): Spec[TestEnvironment, E1]

Automatically constructs the part of the environment that is not part of the TestEnvironment, leaving an effect that only depends on the TestEnvironment. This will also satisfy transitive TestEnvironment requirements with TestEnvironment.any, allowing them to be provided later.

Automatically constructs the part of the environment that is not part of the TestEnvironment, leaving an effect that only depends on the TestEnvironment. This will also satisfy transitive TestEnvironment requirements with TestEnvironment.any, allowing them to be provided later.

val zio: ZIO[OldLady with Console, Nothing, Unit] = ???
val oldLadyLayer: ZLayer[Fly, Nothing, OldLady] = ???
val flyLayer: ZLayer[Blocking, Nothing, Fly] = ???

// The TestEnvironment you use later will provide both Blocking to flyLayer and
// Console to zio
val zio2 : ZIO[TestEnvironment, Nothing, Unit] =
 zio.provideCustom(oldLadyLayer, flyLayer)
Deprecated
inline def provideCustomShared[E1 >: E](inline layer: ZLayer[_, E1, _]*): Spec[TestEnvironment, E1]

Automatically constructs the part of the environment that is not part of the TestEnvironment, leaving an effect that only depends on the TestEnvironment, sharing services between all tests.

Automatically constructs the part of the environment that is not part of the TestEnvironment, leaving an effect that only depends on the TestEnvironment, sharing services between all tests.

This will also satisfy transitive TestEnvironment requirements with TestEnvironment.any, allowing them to be provided later.

val zio: ZIO[OldLady with Console, Nothing, Unit] = ???
val oldLadyLayer: ZLayer[Fly, Nothing, OldLady] = ???
val flyLayer: ZLayer[Blocking, Nothing, Fly] = ???

// The TestEnvironment you use later will provide both Blocking to flyLayer and
// Console to zio
val zio2 : ZIO[TestEnvironment, Nothing, Unit] =
 zio.provideCustom(oldLadyLayer, flyLayer)
Deprecated