moved mock schema out of t/var
[dbsrgits/DBIx-Class.git] / t / admin / 04include.t
CommitLineData
07a4bdb6 1use strict;
2use warnings;
3
4use Test::More;
5use Test::Exception;
6
7BEGIN {
8 require DBIx::Class;
9 plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for('admin')
10 unless DBIx::Class::Optional::Dependencies->req_ok_for('admin');
11}
12
13if(use_ok 'DBIx::Class::Admin') {
14 my $admin = DBIx::Class::Admin->new(
dd67b167 15 include_dirs => ['t/dbicadmin-test-include/lib'],
c2c1db3c 16 schema_class => 'Foo',
17 config => { Foo => {} },
18 config_stanza => 'Foo'
07a4bdb6 19 );
20 lives_ok { $admin->_build_schema } 'should survive attempt to load module located in include_dirs';
c2c1db3c 21 {
22 no warnings 'once';
23 ok($Foo::loaded);
24 }
07a4bdb6 25}
26
27done_testing;