X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Funit_utils_load_class.t;fp=t%2Funit_utils_load_class.t;h=8fe1828f7933863b90c8e768c15b7826c07d56c3;hp=06924ec7f06beedc1cc4bd52261a862eda256499;hb=7a1958ebdeec92527758a4f23ab9928d28e742c7;hpb=7066a4d53877d5684238582f416ce26a70bdc708 diff --git a/t/unit_utils_load_class.t b/t/unit_utils_load_class.t index 06924ec..8fe1828 100644 --- a/t/unit_utils_load_class.t +++ b/t/unit_utils_load_class.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 14; +use Test::More tests => 16; use lib "t/lib"; @@ -41,6 +41,11 @@ eval { Catalyst::Utils::ensure_class_loaded("This::Module::Is::Probably::Not::Th ok( $@, "doesn't defatalize" ); like( $@, qr/There\.pm.*\@INC/, "error looks right" ); +undef $@; +eval { Catalyst::Utils::ensure_class_loaded("__PACKAGE__") }; +ok( $@, "doesn't defatalize" ); +like( $@, qr/__PACKAGE__\.pm.*\@INC/, "errors sanely on __PACKAGE__.pm" ); + $@ = "foo"; Catalyst::Utils::ensure_class_loaded("TestApp::View::Dump::Response"); is( $@, "foo", '$@ is untouched' );