#! /usr/bin/perl -w use strict; use Data::Dumper; BEGIN { use DBIx::RunSQL; open(FH,'>','/tmp/create.sql') or die('Could not create a file'); print FH <create( dsn => 'dbi:SQLite:dbname=:memory:', sql => '/tmp/create.sql', force => 1, #verbose => 1, ); # override the config file where database connection string is # located, instead setup database handle use Internal::Config; $Internal::Config::c->{dbh} = $dbh; $Internal::Config::c->{db_dsn} = undef; $ENV{DBIC_TRACE} = 1; } use Test::More 'no_plan'; # module using DBIx::Class model use ModuleTest; my $module_test = ModuleTest->new({ id => 1 }); is($t->id, 1, 'Value of id'); is($t->name, 'Name1', 'Value of name'); is($t->description, undef, 'Value of description');