update test suite to skip if cannot load DBIx::Class::Admin
[dbsrgits/DBIx-Class-Historic.git] / t / admin / 02ddl.t
index de1f067..3aaf60c 100644 (file)
@@ -8,8 +8,7 @@
 #        FILES:  ---
 #         BUGS:  ---
 #        NOTES:  ---
-#       AUTHOR:  Gordon Irving (), <Gordon.irving@sophos.com>
-#      COMPANY:  Sophos
+#       AUTHOR:  Gordon Irving (), <goraxe@cpan.org>
 #      VERSION:  1.0
 #      CREATED:  28/11/09 16:14:21 GMT
 #     REVISION:  ---
@@ -22,9 +21,14 @@ use Test::More;                      # last test to print
 
 use Test::Exception;
 
+
+BEGIN {
+    eval "use DBIx::Class::Admin";
+    plan skip_all => "Deps not installed: $@" if $@;
+}
+
 use Path::Class;
 use FindBin qw($Bin);
-
 use Module::Load;
 
 use lib dir($Bin,'..', '..','lib')->stringify;
@@ -91,8 +95,7 @@ $admin = DBIx::Class::Admin->new(
        connect_info => $schema->storage->connect_info(),
 );
 
-$admin->preversion("1.0");
-lives_ok { $admin->create($schema->storage->sqlt_type(), ); } 'Can create diff for ' . $schema->storage->sqlt_type;
+lives_ok { $admin->create($schema->storage->sqlt_type(), {}, "1.0" ); } 'Can create diff for ' . $schema->storage->sqlt_type;
 # sleep required for upgrade table to hold a distinct time of upgrade value
 # otherwise the returned of get_db_version can be undeterministic
 sleep 1;