(travis) Run a couple tests in single-threaded mode
[dbsrgits/DBIx-Class.git] / t / 102load_classes.t
CommitLineData
89271e56 1use strict;
2use warnings;
3use Test::More;
4
8d6b1478 5use lib 't/lib';
6use DBICTest;
89271e56 7
8my $warnings;
9eval {
10 local $SIG{__WARN__} = sub { $warnings .= shift };
11 package DBICTest::Schema;
12 use base qw/DBIx::Class::Schema/;
13 __PACKAGE__->load_classes;
14};
15ok(!$@, 'Loaded all loadable classes') or diag $@;
16like($warnings, qr/Failed to load DBICTest::Schema::NoSuchClass. Can't find source_name method. Is DBICTest::Schema::NoSuchClass really a full DBIC result class?/, 'Warned about broken result class');
17
18my $source_a = DBICTest::Schema->source('Artist');
19isa_ok($source_a, 'DBIx::Class::ResultSource::Table');
20my $rset_a = DBICTest::Schema->resultset('Artist');
21isa_ok($rset_a, 'DBIx::Class::ResultSet');
22
8d6b1478 23done_testing;