• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSObject -poseAs:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSObject -poseAs:
      • From: Jim Brownfield <email@hidden>
References: 
 >NSObject -poseAs: (From: "Mike R. Manzano" <email@hidden>)
 >Re: NSObject -poseAs: (From: "Clark Cox" <email@hidden>)

  • Prev by Date: Re: NSObject -poseAs:
  • Next by Date: Re: NSObject -poseAs:
  • Previous by thread: Re: NSObject -poseAs:
  • Next by thread: Re: NSObject -poseAs:
  • Index(es):
    • Date
    • Thread