Marius Kjeldahl wrote: > > my $APPLOC = 'http://localhost/calapp/no'; > $u->get_ok ($APPLOC, 'Application startup'); > > fails with: > > Couldn't instantiate component "CalApp::Model::CalAppDB", "Either > ->config->{connect_info} must be defined for CalApp::Model::CalAppDB > or CalAppDB must have connect info defined on itHere's what we got: > $VAR1 = bless( { > 'schema_class' => 'CalAppDB', > 'connect_info' => undef > }, 'CalApp::Model::CalAppDB' ); > at /usr/local/share/perl/5.8.8/Catalyst/Test.pm line 90" at > /usr/local/share/perl/5.8.8/Catalyst/Test.pm line 90 > I've seen this or similar. It's usually an indication that the Catalyst code is failing to see the config file (calappdb.yml or calappdb.conf), when you are defining the DBI parameters here rather than hardcoding them inside CalApp::Model::CalAppDB.pm which the helper script does for you by default.
Maybe you're running your tests from a different directory than where the config file lives. Try running your test with CALAPP_CONFIG=/path/to/dir I actually have a special config I use for running tests (though the default tests that get created are completely safe to run against the live database). My tests are destructive, and start by creating a brand new SQLite database that I can run against. _______________________________________________ List: [email protected] Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
