Another example of fail
Tomas Doran [Sat, 5 May 2012 14:50:40 +0000 (15:50 +0100)]
xt/lib/ExampleMooseRoleOne.pm [new file with mode: 0644]
xt/lib/ExampleMooseRoleTwo.pm [new file with mode: 0644]
xt/more-jenga.t [new file with mode: 0644]

diff --git a/xt/lib/ExampleMooseRoleOne.pm b/xt/lib/ExampleMooseRoleOne.pm
new file mode 100644 (file)
index 0000000..d9f4a36
--- /dev/null
@@ -0,0 +1,5 @@
+package ExampleMooseRoleOne;
+use Moose::Role;
+
+1;
+
diff --git a/xt/lib/ExampleMooseRoleTwo.pm b/xt/lib/ExampleMooseRoleTwo.pm
new file mode 100644 (file)
index 0000000..9c7a353
--- /dev/null
@@ -0,0 +1,5 @@
+package ExampleMooseRoleTwo;
+use Moose::Role;
+
+1;
+
diff --git a/xt/more-jenga.t b/xt/more-jenga.t
new file mode 100644 (file)
index 0000000..9dfd257
--- /dev/null
@@ -0,0 +1,32 @@
+use strict;
+use warnings;
+use Test::More;
+
+use FindBin qw/ $Bin /;
+use lib "$Bin/lib";
+
+{
+    package ExampleRole;
+    use Moo::Role;
+
+    requires 'foo';
+
+    with qw/
+        ExampleMooseRoleOne
+        ExampleMooseRoleTwo
+    /;
+}
+
+{
+    package ExampleClass;
+    use Moose;
+
+    with 'ExampleRole';
+
+    sub foo {}
+}
+
+ok 1;
+
+done_testing;
+