Re: [Perlunit-users] using Test::Unit::Setup
Status: Beta
Brought to you by:
mca1001
|
From: Roger D. <rog...@gl...> - 2006-06-22 08:29:23
|
Attached are a set of working tests and the script that invokes them.
At 21/06/2006 18:42:16, per...@li...
wrote:
>Greetings,
>
>Is there an example usage of Test::Unit::Setup someone could refer me
>to? I'm afraid I might be using it the wrong way.
>
>Here is how I've got it in a sample setup:
>
>-----------------------------------
>package MITestSuite;
>
>use base qw(Test::Unit::Setup Test::Unit::TestSuite);
>
>sub name{ 'MITestSuite'};
>
>sub include_tests{
>qw(
>SiteMgrTestSuite
>PubSysTestSuite
>);
>}
>------------------------------------
>
>This outputs:
>
>Suite setup
>E
>Time: 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
>
>!!!FAILURES!!!
>Test Results:
>Run: 0, Failures: 0, Errors: 1
>
>There was 1 error:
>Use of uninitialized value in string at
>/home/shilton/shared/my_perl/lib/Test/Unit/Decorator.pm line 30.
>Use of uninitialized value in string at
>/home/shilton/shared/my_perl/lib/Test/Unit/Decorator.pm line 30.
>1) /home/shilton/shared/my_perl/lib/Test/Unit/Decorator.pm:15 -
>Can't call method "run" on an undefined value
>Can't locate object method "annotations" via package "MITestSuite" at
>/home/shilton/shared/my_perl/lib/Test/Unit/TestRunner.pm line 107.
>
>
>I see that the set_up() method is being called successfully, but it's
>dying on line 15 because $self->{_fTest} is undefined, and it looks
>like it's not being innited in the new() method, because the param
>used to populate _fTest is not passed in all the way up the stack.
>
>Am I using Test::Unit::Setup incorrectly?
>
>P.S. I've tried a number of different 'use base()' param lists. Each
>had different behavior, but none what I was looking for.
>
>Thanks for any help.
>
>--
>Steven Hilton <msh...@gm...>
><http://mshiltonj.com/>
>
>"It is the duty of the patriot to protect
>his country from its government." -- Thomas Paine
>
>All the advantages of Linux Managed Hosting--Without the Cost and Risk!
>Fully trained technicians. The highest number of Red Hat certifications
in
>the hosting industry. Fanatical Support. Click to learn more
>http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
>_______________________________________________
>Perlunit-users mailing list
>Per...@li...
>https://lists.sourceforge.net/lists/listinfo/perlunit-users
> |