X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Funit_utils_load_class.t;h=8fe1828f7933863b90c8e768c15b7826c07d56c3;hb=f04fdedae056296d0fa97fbdcaa85b9811ca6a5b;hp=06924ec7f06beedc1cc4bd52261a862eda256499;hpb=59ede84ed03cb297507bbb89058479040969c6f8;p=catagits%2FCatalyst-Runtime.git 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' );