diff options
author | Ricardo Signes <rjbs@cpan.org> | 2013-12-31 10:34:13 -0500 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2013-12-31 10:34:13 -0500 |
commit | b75fcea1748c2c3be6fadf3031838d0d920cc143 (patch) | |
tree | fd2ad2569af849b6515298c94ee71056905d4e33 /t | |
parent | 8ccc44f43e8f88de22c102482b063aee55f92d69 (diff) |
fix skip count when MIME::Entity is not present
Diffstat (limited to 't')
-rw-r--r-- | t/abstractions.t | 2 | ||||
-rw-r--r-- | t/lib/Test/EmailAbstract.pm | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/t/abstractions.t b/t/abstractions.t index bdc4556..0a2e4dc 100644 --- a/t/abstractions.t +++ b/t/abstractions.t @@ -87,7 +87,7 @@ for my $ref (0..1) { { SKIP: { - $tester->load('MIME::Entity'); # cheating!!! -- rjbs, 2013-07-30 + $tester->load('MIME::Entity', { SKIP => 1 }); open my $fh, '<', 't/multipart.msg' or die "can't open t/multipart.msg: $!"; my $message = do { local $/; <$fh>; }; diff --git a/t/lib/Test/EmailAbstract.pm b/t/lib/Test/EmailAbstract.pm index 43c1291..188519c 100644 --- a/t/lib/Test/EmailAbstract.pm +++ b/t/lib/Test/EmailAbstract.pm @@ -106,11 +106,12 @@ sub class_ok { shift->_do_tests(0, @_); } sub object_ok { shift->_do_tests(1, @_); } sub load { - my ($self, $class) = @_; + my ($self, $class, $arg) = @_; if (eval "require $class; Email::Abstract->__class_for('$class')") { diag "testing $class with " . $class->VERSION; } else { - skip "$class: unavailable", $self->tests_per_module; + my $skip = $arg && $arg->{SKIP} ? $arg->{SKIP} : $self->tests_per_module; + skip "$class: unavailable", $skip; } } |