specta/expecta — pull request #48 by klaaspieter (2013-09-24 19:13:23+00:00)
Title: Make prerequesites asynchronous

Currently prerequisites will fail prematurely when used asynchronously. For example:

array = nil
expect(array).will.haveCountOf(0)

// sometime before the matcher times out
array = @[]

will immediately fail because prerequisites are verified outside of the asynchronies logic. I propose matcher prerequisite to also be checked several times until the prerequisite met or until the matcher times out.

Note that this is a backwards incompatible change because most matchers evaluate their prerequisite only once when the matcher is created.