I'm writing Test::Pod::URI, which is going to follow pretty much the same structure as Test::Pod::Coverage. As such, I've got a subroutine all_pod_uris_ok() which will find all the POD files in a distro and test them using the pod_uris_ok() subroutine. Each one of those calls is a test, so it counts the number of files it finds, and asserts that number as its planned number of tests (using Test::Builder's plan() method).

So, I created a test using Test::Builder::Tester to test it which basically lies to the subroutine about where it should look for the POD, and it seems to work OK apart from the fact that I can't actually make the planning work - all_pod_uris_ok() asserts a plan, and because I'm using Test::Builder::Tester that plan still gets asserted in the scope of the test, so Test::More complains when I try to plan the number of Test::Builder::Tester tests I'm running.

Any clues how to overcome the problem?

The only solution I've thought of so far is to add a back door way to make it not assert a plan at all. Which works, but it seems... wrong.

Ian

P.S. Test::Pod::Coverage doesn't seem to test its all_pod_coverage_ok() subroutine, except by running it on itself. I wonder if this is why....

Reply via email to