What's Changed
Added not implemented method description to NotImplementedError. Now you will also see failed method
Added new simple methods to StubbedMethod, StubbedIOMethod, StubbedZIOMethod.
Examples are below
StubbedMethod - returnsWith
Allows to set result for all arguments
trait Foo:
def foo(x: Int): String
val foo = stub[Foo]
foo.foo.returnsWith("1")
StubbedIOMethod - succeedsWith and raisesErrorWith
trait Foo:
def foo(x: Int): IO[String]
val foo = stub[Foo]
for {
_ <- foo.foo.succeedsWith("1")
_ <- foo.foo.raisesErrorWith(new RuntimeException("fail"))
} yield ()
StubbedZIOMethod - succeedsWith, failsWith, diesWith
trait Foo:
def foo(x: Int): IO[Int, String]
val foo = stub[Foo]
for {
_ <- foo.foo.succeedsWith("1")
_ <- foo.foo.failsWith(2)
_ <- foo.foo.diesWith(new RuntimeException("die"))
} yield ()
Updates
- Update cats-effect to 3.6.1 by @scala-steward in #626
- Update munit-cats-effect to 2.1.0 by @scala-steward in #624
- Update zio, zio-test, zio-test-sbt to 2.1.17 by @scala-steward in #625
- Update sbt-ci-release to 1.9.3 by @scala-steward in #620
- Update sbt, scripted-plugin to 1.10.11 by @scala-steward in #621