Possible to set locale in IC::DateTime extra => {} config
[dbsrgits/DBIx-Class.git] / t / 102load_classes.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5 use Test::More;
6
7 unshift(@INC, './t/lib');
8
9 plan tests => 4;
10
11 my $warnings;
12 eval {
13     local $SIG{__WARN__} = sub { $warnings .= shift };
14     package DBICTest::Schema;
15     use base qw/DBIx::Class::Schema/;
16     __PACKAGE__->load_classes;
17 };
18 ok(!$@, 'Loaded all loadable classes') or diag $@;
19 like($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');
20
21 my $source_a = DBICTest::Schema->source('Artist');
22 isa_ok($source_a, 'DBIx::Class::ResultSource::Table');
23 my $rset_a   = DBICTest::Schema->resultset('Artist');
24 isa_ok($rset_a, 'DBIx::Class::ResultSet');
25