Commit | Line | Data |
07a4bdb6 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Test::More; |
5 | use Test::Exception; |
6 | |
7 | BEGIN { |
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 | |
13 | if(use_ok 'DBIx::Class::Admin') { |
14 | my $admin = DBIx::Class::Admin->new( |
c2c1db3c |
15 | include_dirs => ['t/var/dbicadmincrap/lib'], |
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 | |
27 | done_testing; |