X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F20invocations.t;h=b8a6ef5d04362240ea44c3f4661f03ce563b27ff;hb=ef8e9c69e6f9d83c449a786eefc7413b3147b0ec;hp=fe52379601dec013c9c9054b5a606eb9631cd43c;hpb=128f61d834839db22612bcca96e1014ed9f7e8df;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/t/20invocations.t b/t/20invocations.t index fe52379..b8a6ef5 100644 --- a/t/20invocations.t +++ b/t/20invocations.t @@ -1,5 +1,6 @@ use strict; use Test::More; +use DBIx::Class::Schema::Loader::Optional::Dependencies; use lib qw(t/lib); use make_dbictest_db; @@ -124,15 +125,18 @@ my @invocations = ( ); DBICTest::Schema::14->clone; }, - 'moose' => sub { - package DBICTest::Schema::8; - use base qw/ DBIx::Class::Schema::Loader /; - __PACKAGE__->naming('current'); - __PACKAGE__->connect( - $make_dbictest_db::dsn, - { loader_options => { use_moose => 1 } } - ); - }, + (DBIx::Class::Schema::Loader::Optional::Dependencies->req_ok_for('use_moose') ? + ('moose' => sub { + package DBICTest::Schema::8; + use base qw/ DBIx::Class::Schema::Loader /; + __PACKAGE__->naming('current'); + __PACKAGE__->connect( + $make_dbictest_db::dsn, + { loader_options => { use_moose => 1 } } + ); + }) + : () + ), ); # 4 tests per k/v pair