X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F105view_deps.t;h=bf470befe4b6b31d14bffc42aeb141902a030896;hb=a2c77c97735124a7bf4073cf5cef5480bec752a8;hp=284fb4a00cecac3345fc367511b3287aefe2a0be;hpb=8273e845426f0187b4ad6c4a1b42286fa09a648f;p=dbsrgits%2FDBIx-Class.git diff --git a/t/105view_deps.t b/t/105view_deps.t index 284fb4a..bf470be 100644 --- a/t/105view_deps.t +++ b/t/105view_deps.t @@ -1,4 +1,4 @@ -#!/usr/bin/perl +use DBIx::Class::Optional::Dependencies -skip_all_without => 'deploy'; use strict; use warnings; @@ -11,15 +11,6 @@ use DBICTest; use ViewDeps; use ViewDepsBad; -BEGIN { - require DBIx::Class; - plan skip_all => 'Test needs ' . - DBIx::Class::Optional::Dependencies->req_missing_for('deploy') - unless DBIx::Class::Optional::Dependencies->req_ok_for('deploy'); -} - -use_ok('DBIx::Class::ResultSource::View'); - #################### SANITY my $view = DBIx::Class::ResultSource::View->new; @@ -37,7 +28,7 @@ can_ok( $view, $_ ) for qw/new from deploy_depends_on/; #################### DEPLOY - $schema->deploy( { add_drop_table => 1 } ); + $schema->deploy; #################### DOES ORDERING WORK? @@ -75,7 +66,7 @@ can_ok( $view, $_ ) for qw/new from deploy_depends_on/; #################### DEPLOY2 - warnings_exist { $schema2->deploy( { add_drop_table => 1 } ) } + warnings_exist { $schema2->deploy } [qr/no such table: main.aba_name_artists/], "Deploying the bad schema produces a warning: aba_name_artists was not created.";