* Adriano Ferreira <[EMAIL PROTECTED]> [2006-07-20 22:10]:
> use Test::More;
> 
> subplan tests => 2;
> 
> require_ok('MyModule');
> my $obj = MyModule->new();
> isa_ok($obj, 'MyModule');
> 
> my  @cities = ("Brasilia", "Rio de Janeiro", "Salvador");
> 
> subplan tests => [EMAIL PROTECTED];
> 
> for (@countries) {
>     ok(is_hot($_), "$_ is hot");
>     ok(me_fits($_), "$_ is nice to me");
> }
> 
> end_of_plan;

    use Test::More;

    plan tests => my $tests;

    {
        require_ok( 'MyModule' );
        my $obj = MyModule->new();
        isa_ok( $obj, 'MyModule' );
    }
    BEGIN { $tests += 3 }

    {
        my @cities;
        BEGIN { @cities = ( "Brasilia", "Rio de Janeiro", "Salvador" ) }
        for( @countries ) {
            ok( is_hot( $_ ), "$_ is hot" );
            ok( me_fits( $_ ), "$_ is nice to me" );
        }
    }
    BEGIN { $tests += 2 * @cities }

Regards,
-- 
#Aristotle
*AUTOLOAD=*_;sub _{s/(.*)::(.*)/print$2,(",$\/"," ")[defined wantarray]/e;$1};
&Just->another->Perl->hacker;

Reply via email to