[Catalyst] Run catalyst tests against another database

John Atzger jatzger at hotmail.com
Sat Feb 6 22:01:56 GMT 2010

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::=
  BEGIN {    require MyApp;    my $db =3D $ENV{HARNESS_ACTIVE} ? 'test' : '=
myapp';    my $config =3D MyApp->config->{database}{$db};
    __PACKAGE__->config(                schema_class =3D> 'MyApp::Schema', =
       connect_info =3D> {           dsn =3D> $config->{dsn},          user=
 =3D> $config->{user},          password =3D> $config->{password},    );  }
I don't want test information in my code. How do people do this?
Thanks,Jatzger 		 	   		  =

Hotmail: Free, trusted and rich email service.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100206/bef16=

More information about the Catalyst mailing list