Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async testing and beInstanceOf #162

Open
aprofromindia opened this issue Aug 20, 2015 · 1 comment
Open

Async testing and beInstanceOf #162

aprofromindia opened this issue Aug 20, 2015 · 1 comment

Comments

@aprofromindia
Copy link

Async testing fails with after() fails with the matcher beInstanceOf while equal works, am I missing something - My code here : -

https://github.com/aprofromindia/Airlines-List---Clean-Code/blob/master/Sample%20AppTests/MasterViewControllerSpec.m

@dbarden
Copy link
Contributor

dbarden commented May 3, 2016

I just fell into this.

The problem is that when the matcher is applied for the first time, the pre-requisite of beInstanceOf is not fullfilled.

And, in the case of the pre-requisite not being fulfilled, it will fail immediately instead of retrying the test, as can be seen around here

I guess it would make sense to re-evaluate the pre-requisite every time the runloop runs. If it fails, treat it as a matcher fail and run keep running it. Does that make sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants