How to compose a Matcher[Iterable[A]] from a Matcher[A] with specs testing framework
- by Garrett Rowe
If I have a Matcher[A] how do create a Matcher[Iterable[A]] that is satisfied only if each element of the Iterable satisfies the original Matcher.
class ExampleSpec extends Specification {
def allSatisfy[A](m: => Matcher[A]): Matcher[Iterable[A]] = error("TODO")
def notAllSatisfy[A](m: => Matcher[A]): Matcher[Iterable[A]] =…