Now even the torture corner case works
[dbsrgits/DBIx-Class.git] / t / 94versioning.t
index 92e465c..245d492 100644 (file)
@@ -16,9 +16,9 @@ BEGIN {
     unless ($dsn);
 
 
-    eval "use DBD::mysql; use SQL::Translator 0.09;";
+    eval "use DBD::mysql; use SQL::Translator 0.09003;";
     plan $@
-        ? ( skip_all => 'needs DBD::mysql and SQL::Translator 0.09 for testing' )
+        ? ( skip_all => 'needs DBD::mysql and SQL::Translator 0.09003 for testing' )
         : ( tests => 22 );
 }
 
@@ -82,7 +82,14 @@ my $schema_upgrade = DBICVersion::Schema->connect($dsn, $user, $pass, { ignore_v
 
   # should overwrite files and warn about it
   my @w;
-  local $SIG{__WARN__} = sub { push @w, shift };
+  local $SIG{__WARN__} = sub { 
+    if ($_[0] =~ /^Overwriting/) {
+      push @w, $_[0];
+    }
+    else {
+      warn @_;
+    }
+  };
   $schema_upgrade->create_ddl_dir('MySQL', '2.0', $ddl_dir, '1.0');
 
   is (2, @w, 'A warning generated for both the DDL and the diff');