diff options
Diffstat (limited to 'cpan/autodie/t/skip.t')
-rw-r--r-- | cpan/autodie/t/skip.t | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cpan/autodie/t/skip.t b/cpan/autodie/t/skip.t new file mode 100644 index 0000000000..724cd659aa --- /dev/null +++ b/cpan/autodie/t/skip.t @@ -0,0 +1,19 @@ +#!/usr/bin/perl +use strict; +use warnings; +use Test::More tests => 6; +use FindBin qw($Bin); +use lib $Bin; +use autodie_skippy; + +eval { autodie_skippy->fail_open() }; + +ok($@, "autodie_skippy throws exceptions."); +isa_ok($@, 'autodie::exception', 'Autodie exceptions correct class'); +is($@->package, 'main', 'Skippy classes are skipped.'); + +eval { autodie_unskippy->fail_open() }; + +ok($@, "autodie_skippy throws exceptions."); +isa_ok($@, 'autodie::exception', 'Autodie exceptions correct class'); +is($@->package, 'autodie_unskippy','Unskippy classes are not skipped.'); |