Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 musing on the Monastery: (6)
As of 2015-07-05 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls