Bring out the big-paranoia-harness - make describe_env infallible
[dbsrgits/DBIx-Class.git] / t / sqlmaker / bind_transport.t
index 2d33352..aacd59c 100644 (file)
@@ -1,3 +1,5 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+
 use strict;
 use warnings;
 
@@ -5,7 +7,7 @@ use Test::More;
 use Test::Exception;
 use Math::BigInt;
 
-use lib qw(t/lib);
+
 use DBICTest ':DiffSQL';
 use DBIx::Class::SQLMaker::LimitDialects;
 
@@ -103,45 +105,30 @@ shorthand_check(
   'stringifyable $object === [ {}, $object ]',
 );
 
-throws_ok {
-  shorthand_check(
+shorthand_check(
     [ 2 ],
-    [],
-  )
-} qr !You must supply a datatype/bindtype .+ for non-scalar value  \Q[ 2 ]!,
-  'exception on bare array bindvalue';
+    [ {} => [ 2 ] ],
+);
 
-throws_ok {
-  shorthand_check(
+shorthand_check(
     [ {} => [ 2 ] ],
-    [],
-  )
-} qr !You must supply a datatype/bindtype .+ for non-scalar value  \Q[ 2 ]!,
-  'exception on untyped array bindvalue';
+    [ {} => [ 2 ] ],
+);
 
-throws_ok {
-  shorthand_check(
+shorthand_check(
     [ {}, 2, 3 ],
-    [],
-  )
-} qr !You must supply a datatype/bindtype .+ for non-scalar value  \[ 'HASH\(\w+\)', 2, 3 \]!,
-  'exception on bare multielement array bindvalue';
+    [ {} => [ {}, 2, 3 ] ],
+);
 
-throws_ok {
-  shorthand_check(
+shorthand_check(
     bless( {}, 'Foo'),
-    [],
-  )
-} qr !You must supply a datatype/bindtype .+ for non-scalar value  \Qbless( {}, 'Foo' )!,
-  'exception on bare object';
+    [ {} => bless( {}, 'Foo') ],
+);
 
-throws_ok {
-  shorthand_check(
+shorthand_check(
+    [ {}, bless( {}, 'Foo') ],
     [ {}, bless( {}, 'Foo') ],
-    [],
-  )
-} qr !You must supply a datatype/bindtype .+ for non-scalar value  \Qbless( {}, 'Foo' )!,
-  'exception on untyped object';
+);
 
 
 sub shorthand_check {