Improve trigger 'scope' attribute support (RT#119997)
[dbsrgits/SQL-Translator.git] / t / 04file,fh,string.t
index 9f1100b..9121412 100644 (file)
 use strict;
 
 use IO::File;
-use Storable 'freeze';
 use SQL::Translator;
 use Test::More tests => 3;
 
-
 # The filename, holder for all the data, and the filehandle
 my $datafile = "t/data/mysql/Apache-Session-MySQL.sql";
 my $data;
@@ -27,7 +25,7 @@ my ($v1, $v2);
     my $tr = SQL::Translator->new;
     # Pass filename: simplest way
     $tr->translate($datafile);
-    $v1 = freeze( $tr->schema );
+    $v1 = $tr->schema;
 }
 
 {
@@ -35,9 +33,12 @@ my ($v1, $v2);
     # Pass string reference
     read($fh, $data, -s $datafile);
     $tr->translate(\$data);
-    $v2 = freeze( $tr->schema );
+    $v2 = $tr->schema;
 }
 
+# XXX- Hack to remove Graph hack!
+$_->translator (undef) for ($v1, $v2);
+
 ok(length $v1, "passing string (filename) works");
 ok(length $v2, "passing string as SCALAR reference");
-is($v1, $v2, "from file == from string");
+is_deeply($v1, $v2, "from file == from string");