Closed dulacp closed 8 years ago
Thanks for opening this issue @dulaccc! I can see how this would be pretty annoying if you had classes you didn't control executing arbitrary code in your tests. This would be a breaking change, but it seems like a good idea.
Would you be interested in extending the spec for beforeEach
to add a class that does not explicitly conform to the protocol and verify that it's -beforeEach
and -afterEach
methods were not invoked? It would be nice to have some test coverage for this change.
Following up with a rebased revision on PR #387, thanks for your contribution @dulaccc!
Always a pleasure 👍
For me the culprit class is
GAITrackerModel
but for others it can be another class. The crash happens in theCDRClassHasClassMethod
function.The solution is probably to have only the defined classes that register the
CDRHooks
just likespecta
did in the issue specta#149.Cheers