Skip to content

Instantly share code, notes, and snippets.

@willsheppard
Last active October 8, 2020 13:21
Perl Test::PostgreSQL for Mojolicious
my $postgres_db = Test::PostgreSQL->new;
my $test_schema = MyDBIC::Schema->connect( $postgres_db->dsn );
my $test_migration = DBIx::Class::Migration->new(
schema => $test_schema,
target_dir => 'share',
);
$test_migration->install;
$t->app->helper( 'schema' => sub { $test_schema } );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment