I have at least 3 dists that all do the same sort of thing, and I'm sure
I'm not alone:

  use strict;
  use warnings;
  use lib 'lib';
  use MyDist::Test tests => 42;

  # creates a fresh t/var/mydist.db
  MyDist::Test->init_schema;
  ...run my tests...

Where I probably differ from some is that my MyDist::Test is a mix of my
DBIC schema creation and a wrapper around Test::More...

I'm getting sick of doing this every time I start a new dist that uses
DBIC. What does everyone think about something like a
DBIx::Class::Tester that wraps up most of what we all do anyways?

  use DBIx::Class::Tester qw/
    tests      => 42,
    schema     => 'MyDist::Schema'
    no_deploy  => 1,
    sql_schema => 't/test.sql',
    db_file    => 't/var/mydist.db'
    etc...
  /;
  DBIx::Class::Tester->init_schema

Could be a good thing.... could be a complete disaster if it's to
generic or too specific....

-=Chris

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to