Chris Dolan wrote:
> On Sep 24, 2006, at 12:41 PM, Christopher H. Laco wrote:
> 
>> I've got a crap loads of tests in Handel at the moment; 10000+
>> checkpoints, and enough files that I hit the dreaded "command line too
>> long" under win32 [now fixed]. That's not saying all the tests are
>> glorious and not repetitive. :-)
>>
>> I've still got a ways to go before I'm happy without the dist enough to
>> declare the 1.0 version done. Among things on my list are cleaning up
>> the current test code. A big offender is that not all of my tests have
>> labels.
>>
>> I could've swore that sometime in the last month I saw some chatter
>> about a Test::TestDescriptions module, or a ::TestsHaveDescriptions type
>> thing for Perl::Critic. Assuming I'm not just making that up, has anyone
>> seen mention of such a thing?
>>
>> If no such a beast exists thus far, what would be the easiest way to get
>> such functionality? I was thinking that I could just run a subclass of
>> Test::More in my tests that dies whenever no label argument is supplied.
>> That's not a terrible thing since I already have a Handel::Test module
>> that deals with SQLite setup and teardown in most tests.
> 
> Done.  I created Perl::Critic::Policy::Testing::RequireTestLabels and
> added it to the Perl::Critic SVN at
>   http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic
> (username: "guest", password: "")
> 
> It was pretty simple to write.  Below are the important bits of the
> code.  I encourage others to write Test::More-specific policies for
> Perl::Critic!
> 
> Chris

Ha ha. I just realized that I totally screwed myself out of using this
policy. I'm using a subclass of Test::More, not Test:More itself.

See "Don't 'rm -fr /' when testing" for the topic of that.

Would it be possible, or even desirable to flip some sort of config to
make this test all t files, or tell this policy that my test class eq
'Test::More' in this instance?

-=Chris

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to