From: Wallace Reis Date: Thu, 8 Jan 2009 22:45:35 +0000 (+0000) Subject: failing test for load_namespace X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f421bf764a877932ed5da9a9187d8bfda217f790;p=dbsrgits%2FDBIx-Class-Historic.git failing test for load_namespace --- diff --git a/Makefile.PL b/Makefile.PL index c1b6596..7966ed8 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -33,6 +33,7 @@ test_requires 'DBD::SQLite' => 1.14; test_requires 'Test::Builder' => 0.33; test_requires 'Test::Warn' => 0.11; test_requires 'Test::Exception' => 0; +test_requires 'FindBin' => 0; install_script 'script/dbicadmin'; diff --git a/t/39load_namespaces_1.t b/t/39load_namespaces_1.t index 7911d8d..57613a1 100644 --- a/t/39load_namespaces_1.t +++ b/t/39load_namespaces_1.t @@ -3,10 +3,11 @@ use strict; use warnings; use Test::More; +use FindBin; +use lib "$FindBin::Bin/../t/lib"; +use DBICNSTest::Result::A; -unshift(@INC, './t/lib'); - -plan tests => 6; +plan tests => 7; my $warnings; eval { @@ -27,3 +28,7 @@ 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'); +ok( + $source_b->source_name + eq DBICNSTest::Result::B->result_source_instance->source_name +); \ No newline at end of file diff --git a/t/lib/DBICNSTest/Result/B.pm b/t/lib/DBICNSTest/Result/B.pm index e9cdc37..1d2c779 100644 --- a/t/lib/DBICNSTest/Result/B.pm +++ b/t/lib/DBICNSTest/Result/B.pm @@ -1,5 +1,5 @@ package DBICNSTest::Result::B; -use base qw/DBIx::Class/; +use base qw/DBICNSTest::Result::A/; __PACKAGE__->load_components(qw/PK::Auto Core/); __PACKAGE__->table('b'); __PACKAGE__->add_columns('b');