Merge 'trunk' into 'replication_dedux'
[dbsrgits/DBIx-Class.git] / t / 54taint.t
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
16 package DBICTest::Schema;
17
18 # Use the default test class namespace to avoid the need for a
19 # new test infrastructure. If invalid classes will be introduced to
20 # 't/lib/DBICTest/Schema/' someday, this has to be reworked.
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' );
31 ok( __PACKAGE__->sources(), 'At least on source has been registered' );
32
33 1;