Bump version to accomodate pre-beta testers
[dbsrgits/DBIx-Class.git] / t / 39load_namespaces_3.t
1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
2
3 use strict;
4 use warnings;
5 use Test::More;
6 use Test::Exception;
7 use Test::Warn;
8
9
10 use DBICTest; # do not remove even though it is not used
11
12 lives_ok (sub {
13   warnings_exist ( sub {
14       package DBICNSTestOther;
15       use base qw/DBICTest::BaseSchema/;
16       __PACKAGE__->load_namespaces(
17           result_namespace => [ '+DBICNSTest::Rslt', '+DBICNSTest::OtherRslt' ],
18           resultset_namespace => '+DBICNSTest::RSet',
19       );
20     },
21     qr/load_namespaces found ResultSet class 'DBICNSTest::RSet::C' with no corresponding Result class/,
22   );
23 });
24
25 my $source_a = DBICNSTestOther->source('A');
26 isa_ok($source_a, 'DBIx::Class::ResultSource::Table');
27 my $rset_a   = DBICNSTestOther->resultset('A');
28 isa_ok($rset_a, 'DBICNSTest::RSet::A');
29
30 my $source_b = DBICNSTestOther->source('B');
31 isa_ok($source_b, 'DBIx::Class::ResultSource::Table');
32 my $rset_b   = DBICNSTestOther->resultset('B');
33 isa_ok($rset_b, 'DBIx::Class::ResultSet');
34
35 my $source_d = DBICNSTestOther->source('D');
36 isa_ok($source_d, 'DBIx::Class::ResultSource::Table');
37
38 done_testing;