Re: NSObject -poseAs:
Re: NSObject -poseAs:
- Subject: Re: NSObject -poseAs:
- From: Jim Brownfield <email@hidden>
- Date: Thu, 31 May 2007 15:23:22 -0700
On May 31, 2007, at 3:01 PM, Mike R. Manzano wrote:
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.
Can't you just set a static flag to indicate you're done, and just
call [super ...] when the flag is on?
--
Jim Brownfield
email@hidden
Radical System Solutions, Inc.
_______________________________________________
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