I want my Catalyst tests to run against a test database. I wrote this:
package MyApp::Model::DB; use strict; use base
'Catalyst::Model::DBIC::Schema';
BEGIN {require MyApp;my $db = $ENV{HARNESS_ACTIVE} ? 'test' :
'myapp';my $config = MyApp-config-{database}{$db};
On Sat, Feb 6, 2010 at 2:01 PM, John Atzger jatz...@hotmail.com wrote:
I want my Catalyst tests to run against a test database. I wrote this:
package MyApp::Model::DB;
use strict;
use base 'Catalyst::Model::DBIC::Schema';
BEGIN {
require MyApp;
my $db =
On 6 Feb 2010, at 22:01, John Atzger wrote:
I don't want test information in my code. How do people do this?
Just make your tests set the MYAPP_CONFIG environment variable to
point at a test configuration with different DB details.
e.g.