The Perl and Raku Conference 2025: Greenville, South Carolina - June 27-29 Learn more

use Test::More tests => 2;
my $dir = 'bad-dir';
my $obj = Test::Directory->new($dir);
rmdir($dir);
foreach my $method ( qw(count_unknown is_ok) ) {
dies_ok { $obj->$method } "$method dies without directory";
};