This appears to be similar to the issue I fixed in #608 for Specs2. Consider a test like this:
class CatsResourceErrorSpecs extends FixtureAsyncWordSpec with CatsResourceIO[Int] {
override val resource: Resource[IO, Int] =
IO.raiseError(new RuntimeException("boom")).toResource
"cats resource specifications" should {
"report errors in resource acquisition" in { i =>
fail(s"should not get here, but received $i")
}
}
}
Currently, ScalaTest / cats-effect-testing will not report the RuntimeException; it will manifest as a timeout if ResourceTimeout is finite.
I'm working on a fix.