Wy are you trying to replace one module with another? Sounds like a lot of work. Personally, when I mock something up, I try to minimize what I mock as much as possible to minimize altering the behavior. By limiting what I mock, I can know that at least the other code is getting tested.
But if you really do want to replace one module with another, so long as they present identical interfaces, it shouldn't be too hard. However, if the module exports anything, then you have a problem. You'll need to load it and mock everything before anything else loads it.
Cheers,
Ovid
New address of my CGI Course.
In reply to Re: Testing procedure: how to mock?
by Ovid
in thread Testing procedure: how to mock?
by thor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |