From: Eden Cardim Date: Fri, 7 May 2010 22:02:00 +0000 (+0000) Subject: test for the dbicadmin -I option X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=07a4bdb6d7560d65f21de927204485c4c3be6189;p=dbsrgits%2FDBIx-Class-Historic.git test for the dbicadmin -I option --- diff --git a/t/admin/04include.t b/t/admin/04include.t new file mode 100644 index 0000000..2874934 --- /dev/null +++ b/t/admin/04include.t @@ -0,0 +1,22 @@ +use strict; +use warnings; + +use Test::More; +use Test::Exception; + +BEGIN { + require DBIx::Class; + plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for('admin') + unless DBIx::Class::Optional::Dependencies->req_ok_for('admin'); +} + +if(use_ok 'DBIx::Class::Admin') { + my $admin = DBIx::Class::Admin->new( + include_dirs => 't/var/dbicadmincrap/lib', + schema_class => 'Foo' + ); + lives_ok { $admin->_build_schema } 'should survive attempt to load module located in include_dirs'; + ok($Foo::loaded); +} + +done_testing;