X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F90ensure_class_loaded.t;h=3fc828ecac6e2b8c5e7812a9cd8dfbc92fb83393;hb=ae0419e299792a6a10fc754a2a7c810596023c15;hp=c901d06b465192847c0c7b0ab407f7d7a8f09b07;hpb=9d3d92abe4fefa68f63ba4c90eb60f9e899911d4;p=dbsrgits%2FDBIx-Class.git diff --git a/t/90ensure_class_loaded.t b/t/90ensure_class_loaded.t index c901d06..3fc828e 100644 --- a/t/90ensure_class_loaded.t +++ b/t/90ensure_class_loaded.t @@ -13,7 +13,7 @@ BEGIN { my $schema = DBICTest->init_schema(); -plan tests => 19; +plan tests => 20; # Test ensure_class_found ok( $schema->ensure_class_found('DBIx::Class::Schema'), @@ -72,4 +72,16 @@ ok( Class::Inspector->loaded('DBICTest::FakeComponent'), 'load_optional_class(DBICTest::SyntaxErrorComponent2) threw ok' ); } + +eval { + package Fake::ResultSet; + + use base 'DBIx::Class::ResultSet'; + + __PACKAGE__->load_components('+DBICTest::SyntaxErrorComponent3'); +}; + +# Make sure the errors in components of resultset classes are reported right. +like($@, qr!\Qsyntax error at t/lib/DBICTest/SyntaxErrorComponent3.pm!, "Errors from RS components reported right"); + 1;