RunTimedMatchers
This trait provides matchers for IO-like datatypes which can be executed given an execution environment.
This trait provides matchers for IO-like datatypes which can be executed given an execution environment.
For example you can write with cats.effect
"adding 1 + 1" ! IO(add(1, 1)) must returnValue(2)
However this example will be executed synchronously so those matchers are better used with test libraries which don't support asynchronous execution (like JUnit).
A better approach is to provide an implicit, like the one provided in specs2-cats to convert an IO value into a specs2 Execution. Then you can directly write:
"adding 1 + 1" ! IO(add(1, 1) === 2)
Type members
Classlikes
This Matchers supports combinations of value + duration checks
This Matchers supports combinations of value + duration checks