Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: Sharing configuration information among test files

by jbert (Priest)
on Aug 15, 2008 at 15:59 UTC ( #704567=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Sharing configuration information among test files
in thread Sharing configuration information among test files

You can put the duplicated code in a module (as you would in non-test code). Then your test scripts can look like:

use Test::More; use MyApp::Frob; use MyApp::Test::Config; my $cfg = MyApp::Test::Config->cfg; my $frob = MyApp::Frob->new($cfg->whoToFrob, $cfg->whatToFrob); ok($frob, "can create a frob");


Comment on Re^3: Sharing configuration information among test files
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://704567]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2014-09-18 00:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (101 votes), past polls