[Catalyst] Using Test::WWW::Mechanize::Catalyst on a test database

Jason Galea lists at eightdegrees.com.au
Thu Feb 16 11:27:56 GMT 2012

On Thu, Feb 16, 2012 at 1:25 AM, Robert Rothenberg <robrwo at gmail.com> wrote:

> I would like to use Test::WWW::Mechanize::Catalyst with an alternative
> database schema (since I want to test reading and writing on a database
> with
> the same schema but known data that is not the live database), but it's n=
> clear to me from reading the documentation on how to do this, or even if
> it's possible.
> I've found examples using Catalyst::Test with DBICx::TestDatabase, but I
> cannot get it to work. The line
>  $c->model('DBIC')->schema($schema);
> fails with
>  Can't call method "schema" on an undefined value...

use Test::DBIx::Class;


works for me so..


should work for you..

> Worse, the application uses some PostgreSQL extensions, so
> DBICx::TestDatabase is not appropriate.
> I am looking into Test::DBIx::Class as an alternative, but again, it's
> still
> not clear how to change the database that Test::WWW::Mechanize uses.
> Regards,
> Rob
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120216/b33ab=

More information about the Catalyst mailing list