Added tests or UNIVERSAL methods
Marc Mims [Tue, 26 May 2009 16:14:43 +0000 (09:14 -0700)]
t/032_universal_methods.t [new file with mode: 0644]

diff --git a/t/032_universal_methods.t b/t/032_universal_methods.t
new file mode 100644 (file)
index 0000000..c0b5ba8
--- /dev/null
@@ -0,0 +1,24 @@
+#!perl
+
+use strict;
+use warnings;
+
+# UNIVERSAL methods
+
+use Test::More;
+use Class::MOP;
+
+my $meta_class = Class::MOP::Class->create_anon_class;
+
+my @universal_methods = qw/isa can VERSION/;
+push @universal_methods, 'DOES' if $] >= 5.010;
+
+plan tests => scalar @universal_methods;
+
+TODO: {
+    local $TODO = 'UNIVERSAL methods should be available';
+
+    for my $method ( @universal_methods ) {
+       ok $meta_class->find_method_by_name($method), "has UNIVERSAL method $method";
+    }
+};