scala3mock
scala3mock copied to clipboard
Support for by-name parameters
By name parameters have a different compiler representation than regular functions and need to be handled explicitely in the when
macro.
Example:
trait Test:
def byNameParam(x: => Int): String
val t = mock[Test]
when(t.byNameParam).expect(1).returns("ok")