From: Florian Ragwitz Date: Mon, 9 Mar 2009 22:02:10 +0000 (+0100) Subject: Add test for load_class on stashes with GVs without actual methods. X-Git-Tag: 0.78_01~83 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=860f85abed70a4947fb698784aa94252324d770d;p=gitmo%2FClass-MOP.git Add test for load_class on stashes with GVs without actual methods. --- diff --git a/t/085_load_class_gvstash_detect_bug.t b/t/085_load_class_gvstash_detect_bug.t new file mode 100644 index 0000000..a3461bf --- /dev/null +++ b/t/085_load_class_gvstash_detect_bug.t @@ -0,0 +1,21 @@ +use strict; +use warnings; +use Test::More tests => 3; +use Test::Exception; + +use Class::MOP; +use lib 't/lib'; + +lives_ok { + Class::MOP::load_class('TestClassLoaded::Sub'); +}; + +TestClassLoaded->can('a_method'); + +lives_ok { + Class::MOP::load_class('TestClassLoaded'); +}; + +lives_ok { + TestClassLoaded->a_method; +}