Refactor tests a little bit.
[dbsrgits/DBIx-Class-ResultSource-MultipleTableInheritance.git] / t / 02view_def.t
index 3cda01d..f188e18 100644 (file)
@@ -4,10 +4,9 @@ use lib 't/lib';
 use File::Temp;
 use Test::More qw(no_plan);
 use Test::Exception;
-use Devel::Dwarn;
+use LoadTest;
 
 BEGIN {
-    use_ok 'MTITest';
     $ENV{DBIC_TRACE} = 0;
 }
 
@@ -19,18 +18,16 @@ Set $ENV{DBICTEST_PG_DSN}, _USER and _PASS to run this test
 ( NOTE: This test drops and creates some tables.')
 EOM
 
-dies_ok { MTITest->source('Foo')->view_definition }
+dies_ok { LoadTest->source('Foo')->view_definition }
 "Can't generate view def without connected schema";
 
-my $schema = MTITest->connect( $dsn, $user, $pass );
+my $schema = LoadTest->connect( $dsn, $user, $pass );
 
 my $dir = "t/sql";    # tempdir(CLEANUP => 0);
 
-$schema->storage->dbh->{Warn} = 0;
 lives_ok { $schema->create_ddl_dir( ['PostgreSQL'], 0.1, $dir ) }
 "It's OK to create_ddl_dir";
 lives_ok {
-    $schema->deploy(
-        { add_drop_table => 1, add_drop_view => 1, } );
+    $schema->deploy( { add_drop_table => 1, add_drop_view => 1, } );
 }
 "It's also OK to deploy the schema";