Re: NSObject -poseAs:
Re: NSObject -poseAs:
- Subject: Re: NSObject -poseAs:
- From: "Mike R. Manzano" <email@hidden>
- Date: Thu, 31 May 2007 15:01:31 -0700
On May 31, 2007, at 2:45 PM, Clark Cox wrote:
On 5/31/07, Mike R. Manzano <email@hidden> wrote:
[…]
How do you cancel a poseAs?
You don't.
Do you tell your posing object to pose as itself?
Perhaps posing as is the wrong solution for whatever you're trying
to solve.
Perhaps. I have a unit test that is exercising a method that gets a
singleton object from a factory. I was thinking it would be neat to
create a mock factory that posed as the actual factory, so that when
this method is exercised by the
unit test, the singleton it gets back is a mock singleton returned by
the mock factory.
I've tested this, and it seems to work just fine. Problem is, it
continues to happen past the execution of the test :)
I just need to unpose at the end of the unit test, but if you're
telling me that isn't possible, then what a shame.
Cheers,
Mike
http://proto.skootit.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden