more has_relationship_loaded tests + fix for the failing tests
[dbsrgits/DBIx-Class.git] / xt / standalone_testschema_resultclasses.t
CommitLineData
79061be1 1use warnings;
2use strict;
3
4use Test::More;
5use File::Find;
6
052a832c 7use DBIx::Class::_Util 'sigwarn_silencer';
8
79061be1 9use lib 't/lib';
10
11find({
12 wanted => sub {
13
14 return unless ( -f $_ and $_ =~ /\.pm$/ );
15
16 my $pid = fork();
17 if (! defined $pid) {
18 die "fork failed: $!"
19 }
20 elsif (!$pid) {
052a832c 21 if (my @offenders = grep { $_ ne 'DBIx/Class/_Util.pm' } grep { $_ =~ /(^|\/)DBI/ } keys %INC) {
79061be1 22 die "Wtf - DBI* modules present in %INC: @offenders";
23 }
24
052a832c 25 local $SIG{__WARN__} = sigwarn_silencer( qr/\bdeprecated\b/i );
562a1229 26 require( ( $_ =~ m| t/lib/ (.+) |x )[0] ); # untaint and strip lib-part (. is unavailable under -T)
79061be1 27 exit 0;
28 }
29
30 is ( waitpid($pid, 0), $pid, "Fork $pid terminated sucessfully");
31 my $ex = $? >> 8;
32 is ( $ex, 0, "Loading $_ ($pid) exitted with $ex" );
33 },
34
35 no_chdir => 1,
36}, 't/lib/DBICTest/Schema/');
37
38done_testing;