No such thing as a small change | |
PerlMonks |
Re: Testing without linking to legacy codebaseby MidLifeXis (Monsignor) |
on Jun 07, 2016 at 14:16 UTC ( [id://1165078]=note: print w/replies, xml ) | Need Help?? |
Agreed with stevieb on mocking. My goto for this is Test::Mock::Guard. Basically you are replacing some method on a class or object with your own.
Your provided sub would then return some pre-baked values instead of going to the original system. --MidLifeXis
In Section
Seekers of Perl Wisdom
|
|