Tests for Mouse::Tiny + Mouse
Shawn M Moore [Sun, 28 Sep 2008 19:30:21 +0000 (19:30 +0000)]
t/600-tiny-tiny.t [new file with mode: 0644]
t/601-tiny-mouse.t [new file with mode: 0644]
t/602-mouse-tiny.t [new file with mode: 0644]

diff --git a/t/600-tiny-tiny.t b/t/600-tiny-tiny.t
new file mode 100644 (file)
index 0000000..c0b81f8
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+do {
+    package Class;
+    use Mouse::Tiny;
+
+    has attr => (
+        is => 'rw',
+    );
+
+    package Class2;
+    use Mouse::Tiny;
+
+    has attr => (
+        is => 'rw',
+    );
+};
+
+is(Class->new(attr => 'a')->attr, 'a');
+is(Class2->new(attr => 'b')->attr, 'b');
+
diff --git a/t/601-tiny-mouse.t b/t/601-tiny-mouse.t
new file mode 100644 (file)
index 0000000..2a61bf3
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+do {
+    package Class;
+    use Mouse::Tiny;
+
+    has attr => (
+        is => 'rw',
+    );
+
+    package Class2;
+    use Mouse;
+
+    has attr => (
+        is => 'rw',
+    );
+};
+
+is(Class->new(attr => 'a')->attr, 'a');
+is(Class2->new(attr => 'b')->attr, 'b');
+
diff --git a/t/602-mouse-tiny.t b/t/602-mouse-tiny.t
new file mode 100644 (file)
index 0000000..663d46c
--- /dev/null
@@ -0,0 +1,24 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+do {
+    package Class;
+    use Mouse;
+
+    has attr => (
+        is => 'rw',
+    );
+
+    package Class2;
+    use Mouse::Tiny;
+
+    has attr => (
+        is => 'rw',
+    );
+};
+
+is(Class->new(attr => 'a')->attr, 'a');
+is(Class2->new(attr => 'b')->attr, 'b');
+