Commit | Line | Data |
83542a7d |
1 | #!perl -T |
2 | |
3 | # the above line forces Test::Harness into taint-mode |
4 | |
5 | use strict; |
6 | use warnings; |
7 | |
8 | our @plan; |
9 | |
10 | BEGIN { |
11 | eval "require Module::Find;"; |
12 | @plan = $@ ? ( skip_all => 'Could not load Module::Find' ) |
13 | : ( tests => 2 ); |
14 | } |
15 | |
3fe04f74 |
16 | package DBICTest::Plain; |
83542a7d |
17 | |
3fe04f74 |
18 | # Use the Plain test class namespace to avoid the need for a |
83542a7d |
19 | # new test infrastructure. If invalid classes will be introduced to |
3fe04f74 |
20 | # 't/lib/DBICTest/Plain/' someday, this has to be reworked. |
83542a7d |
21 | |
22 | use lib qw(t/lib); |
23 | |
24 | use Test::More @plan; |
25 | |
26 | use base qw/DBIx::Class::Schema/; |
27 | |
28 | eval{ __PACKAGE__->load_classes() }; |
29 | cmp_ok( $@, 'eq', '', |
30 | 'Loading classes with Module::Find worked in taint mode' ); |
3fe04f74 |
31 | ok( __PACKAGE__->source('Test'), 'The Plain::Test source has been registered' ); |
83542a7d |
32 | |
33 | 1; |