Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Eliminating duplicated code in multiple test scripts using Test::More

by kcott (Chancellor)
on Jul 22, 2013 at 10:06 UTC ( #1045618=note: print w/replies, xml ) Need Help??


in reply to Re^2: Eliminating duplicated code in multiple test scripts using Test::More
in thread Eliminating duplicated code in multiple test scripts using Test::More

While I'm aware that done_testing($number_of_tests) is a newer addition to Test::More (and, as such, could be referred to as a modern way), I'm not convinced that using done_testing() is the modern way. I can see that I'm possibly misinterpreting your intent: perhaps you could clarify, particularly with respect to any special situations or conditions that you considered implicit in your statement.

++choroba makes a good argument for specifying the number of tests. Another, which has certainly happened to me, is being interrupted in the process of writing a series of planned tests and then, on resumption of the task, accidentally skipping one that hadn't been written yet: specifying the number of tests up-front catches that too.

Test::More's documentation, in the (cutely named) "I love it when a plan comes together" section, has "The preferred way to do this is to declare a plan ..."; and later, in the done_testing bullet point, "This is safer than and replaces the "no_plan" plan.".

-- Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1045618]
help
Chatterbox?
[marto]: I had a feeling I'd regret looking up the definition of 'soyboy'
[Veltro]: usemodperl Maybe it is the way you talk? 'Soy boys', 'old ladies' and what is even a tgimer...
usemodperl is venting, duh?
[usemodperl]: that was a typos, dumbass
[marto]: usemodperl I guess that depends on what you mean by a safe space, since many people seem to have the impression a safe space allows them to do/say whatever they feel like, without question or critque
[marto]: 'typos'->'typo'
[usemodperl]: it's like you guys are retarded or something, no sense of humor? autism?
[usemodperl]: take things too literally, nothing is funny, everyhting must be perfect, or else, SCOLD SCOLD SCOLD, haha
[Veltro]: usemodperl I think you are offensive right now.
[marto]: people are very defnsive about their bad ideas behaviour' :P

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2018-06-24 15:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?