From: Mark Addison Date: Wed, 18 May 2005 16:14:07 +0000 (+0000) Subject: Added hack to remove the Graph stuff hack of adding a ref to the translator, to X-Git-Tag: v0.11008~567 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=31cf3a5441c7796b09b5609fa70d92d5c3e2d200;p=dbsrgits%2FSQL-Translator.git Added hack to remove the Graph stuff hack of adding a ref to the translator, to the schema. Also moved schema equality test to using Test::More::is_deeply instead of Storable to get better diagnostics on failure. --- diff --git a/t/04file,fh,string.t b/t/04file,fh,string.t index ae8fd72..7e4d7b0 100644 --- a/t/04file,fh,string.t +++ b/t/04file,fh,string.t @@ -12,7 +12,6 @@ use strict; use IO::File; -use Storable 'freeze'; use SQL::Translator; use Test::More tests => 3; @@ -26,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; } { @@ -34,9 +33,13 @@ 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! +delete $v1->{translator}; +delete $v2->{translator}; + 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");