$@ = $exception;
return $ok;
},
+ 'dies_ok' => sub (&;$) {
+ my ( $coderef, $description ) = @_;
+ my $exception = $try_as_caller->( $coderef );
+
+ $Tester ||= Test::Builder->new;
+
+ my $ok = $Tester->ok( $is_exception->( $exception ), $description );
+ $@ = $exception;
+ return $ok;
+ },
},
},
);
our @EXPORT_OK = map { keys %$_ } values %dependencies;
our %EXPORT_TAGS = (
all => \@EXPORT_OK,
- test => [qw/throws_ok lives_ok/],
+ test => [qw/throws_ok lives_ok dies_ok/],
);
for my $module (keys %dependencies) {
=head3 throws_ok
+=head3 dies_ok
+
=head3 lives_ok
=cut