Begin writing tests for role application
Shawn M Moore [Tue, 17 Jun 2008 03:43:53 +0000 (03:43 +0000)]
t/402-basic-role-application.t [new file with mode: 0644]

diff --git a/t/402-basic-role-application.t b/t/402-basic-role-application.t
new file mode 100644 (file)
index 0000000..89e2aee
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+do {
+    package Role;
+    use Mouse::Role;
+
+    has 'attr';
+
+    no Mouse::Role;
+};
+
+do {
+    package Class;
+    use Mouse;
+    with 'Role';
+
+    no Mouse;
+};
+
+ok(Class->meta->has_attribute('attr'), "role application added the attribute");
+