Merge 'reorganize_tests' into 'DBIx-Class-current'
[dbsrgits/DBIx-Class.git] / t / run / 09update.tl
index 64b89c0..70d7038 100644 (file)
@@ -1,12 +1,18 @@
-sub run_tests {
-my $schema = shift;
+use strict;
+use warnings;  
+
+use Test::More;
+use lib qw(t/lib);
+use DBICTest;
+
+my $schema = DBICTest::init_schema();
 
 BEGIN {
         eval "use DBD::SQLite";
         plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 3);
 }                                                                               
 
-my $art = $schema->class("Artist")->find(1);
+my $art = $schema->resultset("Artist")->find(1);
 
 isa_ok $art => 'DBICTest::Artist';
 
@@ -21,6 +27,3 @@ ok($art->name($name) eq $name, 'update');
 
 $art->discard_changes;
 
-}
-
-1;