X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F05components.t;h=335fb068fc8be82ec5fc9bb67f9a3d0970cb11ae;hb=50841788d03e2342a00470eb2f458e717922615b;hp=63138635a4e99f7f3b2595a551acb256a2f0ae1b;hpb=8d6b1478d8fa6f7c76e313ee72a72d5eb4c24d03;p=dbsrgits%2FDBIx-Class.git diff --git a/t/05components.t b/t/05components.t index 6313863..335fb06 100644 --- a/t/05components.t +++ b/t/05components.t @@ -1,13 +1,21 @@ +BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } + use strict; use warnings; use Test::More; -use lib qw(t/lib); + use DBICTest; -use DBICTest::ForeignComponent; + +{ + package DBICTest::SomeResult; + use base 'DBIx::Class::Core'; + __PACKAGE__->table("boguz"); +} # Tests if foreign component was loaded by calling foreign's method -ok( DBICTest::ForeignComponent->foreign_test_method, 'foreign component' ); +ok( ! $INC{"DBICTest/ForeignComponent.pm"}, "DBICTest::ForeignComponent not yet loaded" ); +ok( DBICTest::SomeResult->result_class("DBICTest::ForeignComponent")->foreign_test_method, 'foreign component loaded correctly' ); # Test for inject_base to filter out duplicates { package DBICTest::_InjectBaseTest;