Add import-time-skip support to OptDeps, switch most tests over to that
[dbsrgits/DBIx-Class.git] / t / 96_is_deteministic_value.t
index 9f75f4d..330d294 100644 (file)
@@ -1,16 +1,13 @@
+use DBIx::Class::Optional::Dependencies -skip_all_without => 'test_dt';
+
 use strict;
 use warnings;
 
-# 6 tests
-
 use Test::More;
+use Test::Exception;
+
 use lib qw(t/lib);
 use DBICTest;
-plan skip_all => "DateTime required" unless eval { require DateTime };
-eval "use DateTime::Format::Strptime";
-plan skip_all => 'DateTime::Format::Strptime required' if $@;
-plan 'no_plan';
-use Test::Exception;
 
 my $schema = DBICTest->init_schema();
 my $artist_rs = $schema->resultset('Artist');
@@ -57,11 +54,10 @@ my $cd_rs = $schema->resultset('CD');
 {
   my $artist;
   lives_ok {
-    $artist = $artist_rs->search({ name => [ q/ some stupid names here/]})
+    $artist = $artist_rs->search({ name => [ qw(some stupid names here) ]})
       ->create({artistid => undef});
   };
   is($artist->name, undef);
 }
 
-
-1;
+done_testing;