new test for interaction with namespace::autoclean - I don't think this has ever...
Toby Inkster [Fri, 12 Oct 2012 09:40:20 +0000 (10:40 +0100)]
t/namespace-clean.t [new file with mode: 0644]

diff --git a/t/namespace-clean.t b/t/namespace-clean.t
new file mode 100644 (file)
index 0000000..c43d49f
--- /dev/null
@@ -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();