April 14, 2012 82% of Perl Testing Back

Testing Alpha: 'die' conditions (2)

        eval {
            $self = Alpha->new( {
                string  => '',
            } );
        };
        like($@, qr/Alpha::new\(\) needs 'string' argument/,
            "Alpha->new(): got expected error message when 'string' was empty");
        done_testing();


Home Last TOC Copyright © 2012 James E Keenan Back Next