Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
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");

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 lurking in the Monastery: (9)
As of 2016-09-30 13:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (568 votes). Check out past polls.