pivotal/cedar — pull request #79 by akitchen (2013-06-09 18:16:49+00:00)
Title: Fix deallocation of Cedar Double spies when spying on objects compiled under ARC

These changes fix issues encountered when spying on objects compiled under ARC.

A CDRSpyInfo class is introduced to replace usages of objc_setAssociatedObject in CDRSpy.mm.

The CDRSpyInfo is instantiated and held until the spec completes, and then released at which point it restores the spied object's original class. Doing this earlier helps with the teardown of the ARC-compiled object where the MRC-friendly invocation forwarding was working OK.

Test coverage specific to iOS and ARC is added to help give this issue more visibility. A pending spec is added under iOS 5 only to indicate that we are subject to the iOS 5 runtime's "weak reference to NSProxy subclass nil on assignment" bug.