Open kubukoz opened 3 years ago
Hi, I'm interested in knowing/learning more about cats and cats-effects, so I started to look after 'good first issue' tasks.
In this case, If I understand it correctly, you can use testkit outside cats-effect but ticked execution method is defined inside the local cats effect tests subproject (cats.effect.Runners trait), so there is no way to use from an external project
For example with a spec like this
"do the things" in {
val a = unsafeRun(IO(42))
a.isSuccess must beTrue
}
could the error message be something like ?
could not find an instance of Ticker; You have to add some implicit Ticker to the current scope.
{{{
implicit val ticker: Ticker = Ticker(TestContext())
}}}
One more question, from my ignorance and lack of knowledge about this subject so excuse me if I'm asking something stupid, I understand that Ticker holds the TestContext for some instances, why not just simply require an implicit TestContext instead this Ticker case class ?
@jgoday I didn't follow this PR closely, but you may want to take a look at https://github.com/typelevel/cats-effect/pull/2276 which reworked TestContext
. I'm actually not sure if this issue is relevant anymore 😅
Thanks @armanbilge, I will try to follow that thread about TestContext then !
I think the text of the
@implicitNotFound
just needs some tweaking.