Closed fommil closed 6 years ago
FYI I ended up creating a very minimal version of smock for my usecase, I'm sure you'll recognise the hack:
object Mocker {
final class Stub[A] {
def apply[F[_], G[_]](pf: PartialFunction[F[A], G[A]]): F ~> G = new (F ~> G) {
override def apply[α](fa: F[α]): G[α] = pf.asInstanceOf[PartialFunction[F[α], G[α]]](fa)
}
}
def stub[A]: Stub[A] = new Stub[A]
}
meh, if you're porting to cats anyway that's not interesting to me.
It would be great if the
Harness
was available without the specs2 dependency.