We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
beInstanceOf
Class
While I was converting my XCTAssert macros to expect macros, I wrongly copy/pasted actual value as following:
XCTAssert
expect
expect([request class]).to.beAMemberOf([MyRequest class]);
where it should have been:
expect(request).to.beAMemberOf([MyRequest class]);
Is this case, expecta failed with the following message:
expected: an instance of MyRequest, got: an instance of MyRequest
which obviously look weird. Could we improve this? We can check if given value is a class struct with the following conditional:
if ([actual class] == actual) { // A class struct } else { // An instance }
But I'm not sure if making that check only in EXPMatchers+beInstanceOf file enough to handle all cases.
EXPMatchers+beInstanceOf
If you feel this change is enough, I can move for a PR.
Thanks
The text was updated successfully, but these errors were encountered:
Yep - this makes sense, definitely
Sorry, something went wrong.
No branches or pull requests
While I was converting my
XCTAssert
macros toexpect
macros, I wrongly copy/pasted actual value as following:where it should have been:
Is this case, expecta failed with the following message:
which obviously look weird. Could we improve this? We can check if given value is a class struct with the following conditional:
But I'm not sure if making that check only in
EXPMatchers+beInstanceOf
file enough to handle all cases.If you feel this change is enough, I can move for a PR.
Thanks
The text was updated successfully, but these errors were encountered: