X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F39load_namespaces_1.t;h=f7fb08ee2ca39f9190e720e32d8a2fd7e852c904;hb=8aae794001ecccdb26c2bbd1b92c97bba9e65d79;hp=d1600402392dbcedd92506520180de2cbc9b4fb9;hpb=f54428abf9cc7d7e5604745335694eaf558f6820;p=dbsrgits%2FDBIx-Class.git diff --git a/t/39load_namespaces_1.t b/t/39load_namespaces_1.t index d160040..f7fb08e 100644 --- a/t/39load_namespaces_1.t +++ b/t/39load_namespaces_1.t @@ -1,21 +1,23 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } + use strict; use warnings; use Test::More; -use lib qw(t/lib); + use DBICTest; # do not remove even though it is not used my $warnings; eval { local $SIG{__WARN__} = sub { $warnings .= shift }; package DBICNSTest; - use base qw/DBIx::Class::Schema/; + use base qw/DBICTest::BaseSchema/; __PACKAGE__->load_namespaces; }; ok(!$@, 'load_namespaces doesnt die') or diag $@; -like($warnings, qr/load_namespaces found ResultSet class C with no corresponding Result class/, 'Found warning about extra ResultSet classes'); +like($warnings, qr/load_namespaces found ResultSet class 'DBICNSTest::ResultSet::C' with no corresponding Result class/, 'Found warning about extra ResultSet classes'); -like($warnings, qr/load_namespaces found ResultSet class DBICNSTest::ResultSet::D that does not subclass DBIx::Class::ResultSet/, 'Found warning about ResultSets with incorrect subclass'); +like($warnings, qr/load_namespaces found ResultSet class 'DBICNSTest::ResultSet::D' that does not subclass DBIx::Class::ResultSet/, 'Found warning about ResultSets with incorrect subclass'); my $source_a = DBICNSTest->source('A'); isa_ok($source_a, 'DBIx::Class::ResultSource::Table');