Permalink
Browse files

Add the class/method to the test failure description when we return e…

…arly

+ fix wrong method name in docs
  • Loading branch information...
1 parent 821b68d commit 60c011e7dac42a41e967672845f4217bf15d04b0 @adrianh committed Apr 17, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Test/Class.pm
View
@@ -288,7 +288,8 @@ sub _run_method {
$exception = '';
} else {
if ($self->fail_if_returned_early) {
- $Builder->ok(0, "(returned before plan complete)");
+ my $class = ref $self;
+ $Builder->ok(0, "($class\::$method returned before plan complete)");
} else {
$Builder->skip( $skip_reason );
}
@@ -1507,7 +1508,7 @@ For example, if you had a test script that only applied to the darwin OS you cou
=item B<add_testinfo>
- CLASS->add_test($name, $type, $num_tests)
+ CLASS->add_testinfo($name, $type, $num_tests)
Chiefly for use by libraries like L<Test::Class::Sugar>, which can't use the C<:Test(...)> interfaces make test methods. C<add_testinfo> informs the class about a test method that has been defined without a C<Test>, C<Tests> or other attribute.

0 comments on commit 60c011e

Please sign in to comment.