Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Releases: scalamock/scalamock

7.5.2

07 Nov 08:27
605cc52

Choose a tag to compare

Bug fixes

Dependency updates

Full Changelog: v7.5.1...v7.5.2

7.5.1

03 Nov 10:39
58d980a

Choose a tag to compare

What's Changed

  • Preserve method order in a Scala 3 macro by @ioaoue in #701

New Contributors

Full Changelog: v7.5.0...v7.5.1

7.5.0

10 Sep 13:30
7ac04ac

Choose a tag to compare

New Features

🔥 ZIO Test support for Classic Scalamock by @evis in #665 featuring

  1. Easier migration path from zio-mock
  2. Ability to verify that effects were actually invoked.
  3. Safe mock creation via ZLayer
  4. Support for property-based testing
  5. Familiar scalamock syntax and clear error messages

This integration is already used in a large codebase and is considered production test ready

https://scalamock.org/classic/zio-test/

Bug Fixes

Dependencies

Full Changelog: v7.4.2...v7.5.0

7.4.2

05 Sep 16:24
1e822e9

Choose a tag to compare

Bug fixes

Dependencies

Full Changelog: v7.4.1...v7.4.2

7.4.1

06 Aug 10:36
7cb7b83

Choose a tag to compare

What's Changed

Full Changelog: v7.4.0...v7.4.1

v7.4.0

03 Jul 17:44
84c46d5

Choose a tag to compare

What's Changed

  • replace StubbedMethod0[R] with StubbedMethod[Unit, R] by @goshacodes in #635

Full Changelog: v7.3.3...v7.4.0

7.3.3

21 Jun 05:30
93f7b24

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v7.3.2...v7.3.3

7.3.2

30 Apr 13:04
b33bfb7

Choose a tag to compare

What's Changed

StubbedMethod0[R] will be replaced with StubbedMethod[Unit, R] to make model simpler and allow to generalize with different methods. To make it possible - we need to make its API similar.
Thats why:

  1. returns in StubbedMethod0 is deprecated, returnsWith should be used instead
  2. returnsZIO in StubbedZIOMethod0 is deprecated, returnsZIOWith or other methods should be used instead
  3. returnsIO in StubbedIOMethod0 is deprecated, returnsIOWith or other methods should be used instead

After 01.07.2025 new minor version will be published without StubbedMethod0 and deprecated methods will change their signatures to ones from StubbedMethod.

Full Changelog: v7.3.1...v7.3.2

7.3.1

18 Apr 12:53
061a624

Choose a tag to compare

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

7.3.0

25 Mar 08:53
113fcea

Choose a tag to compare

What's Changed

Bring new stubs with support for ZIO/cats IO to scala 3 LTS, 2.13 and 2.12.

Full Changelog: v7.2.0...v7.3.0