From: Toby Inkster Date: Fri, 12 Oct 2012 09:40:20 +0000 (+0100) Subject: new test for interaction with namespace::autoclean - I don't think this has ever... X-Git-Tag: v1.002000~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=efc1e3879504b7f535a7734a9273f7853b929ccf;p=gitmo%2FRole-Tiny.git new test for interaction with namespace::autoclean - I don't think this has ever failed, but it doesn't hurt to keep checking it works --- diff --git a/t/namespace-clean.t b/t/namespace-clean.t new file mode 100644 index 0000000..c43d49f --- /dev/null +++ b/t/namespace-clean.t @@ -0,0 +1,24 @@ +use Test::More; + +BEGIN { + eval { require namespace::autoclean ; 1 } + or plan skip_all => 'test requires namespace::autoclean'; +} + +BEGIN { + package Local::Role; + use Role::Tiny; + sub foo { 1 }; +} + +BEGIN { + package Local::Class; + use namespace::autoclean; + use Role::Tiny::With; + with qw( Local::Role ); +}; + +can_ok 'Local::Class', 'foo'; +can_ok 'Local::Class', 'does'; + +done_testing();