Don't ask to ask, just ask | |
PerlMonks |
Re^2: Writing a module testby TStanley (Canon) |
on Jun 09, 2007 at 21:00 UTC ( [id://620217]=note: print w/replies, xml ) | Need Help?? |
I decided the Test::MockObect route was the easier way to go (I couldn't get Test::Expect and its dependencies to complile on my Windows system, and jcwren's system already had T::MO installed) That said, I implemented the Games::QuizTaker:IO module and inserted it into the test section, so that it looks like the following: Well, the in method works fine, the out method has a slight problem. When I run a simple test script inside my development folder, this is what I get for output: Any suggestions? UPDATE: I figured it out. I changed the call from Games::QuizTaker::IO->out to Games::QuizTaker::IO::out. That got rid of the module name in front of the answers. Now to get the test working :-) TStanley -------- People sleep peaceably in their beds at night only because rough men stand ready to do violence on their behalf. -- George Orwell
In Section
Seekers of Perl Wisdom
|
|