After reading my copy of Perl Testing: A Developer's Notebook, and these two articles, I started to tackle the newest test file:
use Test::More tests=>4; use Test::MockObject; use strict; my $module='Games::QuizTaker'; my $TMO=Test::MockObject->new(); $TMO->fake_module($module => ('new' =>sub{ }, 'load' =>sub{ }, 'generate' =>sub{ }, 'test' =>sub{ })); use_ok($module); can_ok($module,'new'); my $gq=Games::QuizTaker->new(filename=>'t/testqa'); can_ok($module,'load'); $gq->load; can_ok($module,'generate'); $gq->generate;
However, make test is saying its a no go...
tstanley@perlmonk ~/modules/Games-QuizTaker $ make test PERL_DL_NONLAZY=1 /usr/bin/perl5.8.8 "-MExtUtils::Command::MM" "-e" "t +est_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01load..........ok + t/02generate......ok + t/03test..........ok 1/4Can't call method "load" on an undefined value + at t/03test.t line 18. # Looks like you planned 4 tests but only ran 3. # Looks like your test died just after 3. t/03test..........dubious + Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED test 4 Failed 1/4 tests, 75.00% okay t/04exceptions....ok + t/05pod...........ok + Failed Test Stat Wstat Total Fail List of Failed ---------------------------------------------------------------------- +--------- t/03test.t 255 65280 4 2 4 Failed 1/5 test scripts. 1/18 subtests failed. Files=5, Tests=18, 1 wallclock secs ( 0.39 cusr + 0.04 csys = 0.43 +CPU) Failed 1/5 test programs. 1/18 subtests failed. make: *** [test_dynamic] Error 255 tstanley@perlmonk ~/modules/Games-QuizTaker $
As always, clues and/or hints are welcome

TStanley
--------
People sleep peaceably in their beds at night only because rough men stand ready to do violence on their behalf. -- George Orwell

In reply to Using Test::MockObject by TStanley

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.