Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'd probably refactor QuizTaker to add a Games::QuizTaker::IO module which implements the extremely simple methods in and out
You can then use Test::MockObject to mock G::QT:IO during your testing of the "test" method and pass data in/out as you want. If you're not so much into mocking objects you could also fork the test and pass the data into your child from the test, or you could put the "test" call into a separate little script and run that via Test::Expect but IMO that's more convoluted. YMMV. All dogma is stupid. In reply to Re: Writing a module test
by tirwhan
|
|