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.