Skip Menu |

This queue is for tickets about the Test-NoPlan CPAN distribution.

Report information
The Basics
Id: 55950
Status: resolved
Priority: 0/
Queue: Test-NoPlan

People
Owner: duncan_j_ferguson [...] yahoo.co.uk
Requestors: APOCAL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 0.0.1
  • 0.0.2
  • v0.0.3
Fixed in: (no value)



Subject: Module needs to use Test::Builder->new() instead of create()
Hello, I thought this was a cool module ( I saw you upload 0.0.3 to PAUSE ) and wanted to give it a shot. Due to the way my testsuite is setup, I run all tests under one test. This module uses create() from Test::Builder and it breaks my testsuite. The fix is simply to use new(), the change doesn't make Test-NoPlan fail it's testsuite but now my testsuite passes! Thanks again for this cool module! ok 1 - 't/1_load.t' has 'no_plan' set ok 2 - 't/apocalypse.t' has 'no_plan' set not ok 542 - block 'Test::Apocalypse::NoPlan' expected 2 test(s) and ran 0 # Running 'Test::Apocalypse::NoPlan' tests... # Failed test 'block 'Test::Apocalypse::NoPlan' expected 2 test(s) and ran 0' ... Parse errors: Tests out of sequence. Found (1) but expected (542) Tests out of sequence. Found (2) but expected (543) Tests out of sequence. Found (542) but expected (544) -- ~Apocalypse
I have just uploaded 0.0.4 I have added 'method => <create|new>' to the arg list for all_plans_ok to say which method you want to use. I couldn't get the tests to pass correctly just changing the method to new, but I can see value in allowing the choice, hence this change. Let me know if you have any problems. Duncs
Subject: Re: [rt.cpan.org #55950] Module needs to use Test::Builder->new() instead of create()
Date: Wed, 07 Apr 2010 09:49:03 -0700
To: bug-Test-NoPlan [...] rt.cpan.org
From: "perl [...] 0ne.us" <perl [...] 0ne.us>
Duncan Ferguson via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=55950 > > > I have just uploaded 0.0.4 > > I have added 'method => <create|new>' to the arg list for all_plans_ok > to say which method you want to use. > > I couldn't get the tests to pass correctly just changing the method to > new, but I can see value in allowing the choice, hence this change. > > Let me know if you have any problems. > > Duncs >
Hello, Thanks very much for adding this! I've verified it works with my testsuite, yay! However, I'm confused when you said it didn't pass it's own testsuite? Looking at t/ in the dist I don't see anything that would test new/create? Or did you use a custom script to test? I would love to help you make sure the problem is gone for good :) Thanks again for the work on this module! ~Apocalypse
On Wed Apr 07 12:49:20 2010, perl@0ne.us wrote: Show quoted text
> Duncan Ferguson via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=55950 > > > > > I have just uploaded 0.0.4 > > > > I have added 'method => <create|new>' to the arg list for all_plans_ok > > to say which method you want to use. > > > > I couldn't get the tests to pass correctly just changing the method to > > new, but I can see value in allowing the choice, hence this change. > > > > Let me know if you have any problems. > > > > Duncs > >
> Hello, > > Thanks very much for adding this! I've verified it works with my > testsuite, yay! > > However, I'm confused when you said it didn't pass it's own > testsuite? Looking at t/ in the dist I don't see anything that would > test new/create? Or did you use a custom script to test? I would love to > help you make sure the problem is gone for good :) > > Thanks again for the work on this module! > > ~Apocalypse
Hmpf, I spoke too soon... I realized that I ran my testsuite with the hacked version of NoPlan, not 0.0.4! I ran it against 0.0.4 with method => new and it still failed. Looking at the source, I see in line 32 it still does: my $test = Test::Builder->create(); Shouldn't it be: my $method = $arg_ref->{method}; my $test = Test::Builder->$method; Thanks again! -- ~Apocalypse
I will write out 5000 times (without using perl) 'I am a muppet and should double check code before doing releases'. Code now fixed, tests updated accordingly and new version on its way to CPAN. Sorry 'bout that. Duncs
On Thu Apr 08 05:17:49 2010, duncs wrote: Show quoted text
> I will write out 5000 times (without using perl) > > 'I am a muppet and should double check code before doing releases'. > > Code now fixed, tests updated accordingly and new version on its way to > CPAN. > > Sorry 'bout that. > > Duncs
Thanks again for your work! Duncs++ :) P.S. Minor thing - the "THANKS" file is non-standard and if you just renamed it to "AUTHORS" search.cpan.org will pick it up and display it as a "special file" and you can click on it from the dist page, useful! :) -- ~Apocalypse
Hmpf, I didn't mean to set it to open... I left it at "resolved (unchanged)" when I replied to you :( -- ~Apocalypse
Renamed, v0.0.6 on way to CPAN. Thanks for all the suggestions. Duncs
reset to resolved