dhosek has asked for the wisdom of the Perl Monks concerning the following question:
use DBD::Mock;
my $session = DBD::Mock::Session->new(
'testing_session' => (
{
statement => "SHOW TABLES",
results => ['table1', 'table2']
},
)
);
use Module::Being::Tested;
Module::Being::Tested::function($dsn);
Update: I found what I need--sort of. It seems that DBD::Mock requires the tester to have access to the DBI object to do the calls. Is there any workaround for that? I'd prefer to pass in DSN/username/password rather than a DBI object for my module...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBD::Mock problem
by dragonchild (Archbishop) on Apr 11, 2008 at 20:18 UTC |