| April 14, 2012 | 82% of Perl Testing | Back Next | 
new(): 'string' element is empty string
method will 'die'; capture error message
        eval {
            $self = Alpha->new( {
                string  => '',
            } );
        };
        like($@, qr/Alpha::new\(\) needs 'string' argument/,
            "Alpha->new(): got expected error message when 'string' was empty");
continued...
| Home Last TOC | Copyright © 2012 James E Keenan | Back Next |