X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F39load_namespaces_1.t;h=f20ca8c5189dabe38bf5c566e2e865797aeb9a94;hb=b2b2e7fddfd45a365a5cab9c7c9371b1c2557741;hp=8d2dec3650112e1916c6f9f6f64f359fb174a56e;hpb=46a05fd450f4848c6dc5f1302001571a79f4728e;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/39load_namespaces_1.t b/t/39load_namespaces_1.t index 8d2dec3..f20ca8c 100644 --- a/t/39load_namespaces_1.t +++ b/t/39load_namespaces_1.t @@ -4,9 +4,10 @@ use strict; use warnings; use Test::More; -unshift(@INC, './t/lib'); +use lib qw(t/lib); +use DBICTest; # do not remove even though it is not used -plan tests => 6; +plan tests => 8; my $warnings; eval { @@ -16,7 +17,7 @@ eval { __PACKAGE__->load_namespaces; }; ok(!$@) or diag $@; -like($warnings, qr/load_namespaces found ResultSet class C with no corresponding source-definition class/); +like($warnings, qr/load_namespaces found ResultSet class C with no corresponding Result class/); my $source_a = DBICNSTest->source('A'); isa_ok($source_a, 'DBIx::Class::ResultSource::Table'); @@ -27,3 +28,8 @@ my $source_b = DBICNSTest->source('B'); isa_ok($source_b, 'DBIx::Class::ResultSource::Table'); my $rset_b = DBICNSTest->resultset('B'); isa_ok($rset_b, 'DBIx::Class::ResultSet'); + +for my $moniker (qw/A B/) { + my $class = "DBICNSTest::Result::$moniker"; + ok(!defined($class->result_source_instance->source_name)); +}