summaryrefslogtreecommitdiffstats
path: root/t/extending/class.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-07-19 19:21:54 -0500
committerJesse Luehrs <doy@tozt.net>2010-07-19 19:21:54 -0500
commitd1bab5d4a5ea4100803c871461c62744767c514b (patch)
tree1e596286d921bdd58e2bc61eef5aff1c91a70e1b /t/extending/class.t
parent636f22f307ff0dc94a2c2ec23d49c872ecddbc02 (diff)
downloadmoosex-exporter-easy-master.tar.gz
moosex-exporter-easy-master.zip
a few more testsHEADmaster
Diffstat (limited to 't/extending/class.t')
-rwxr-xr-xt/extending/class.t24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/extending/class.t b/t/extending/class.t
new file mode 100755
index 0000000..194cf4c
--- /dev/null
+++ b/t/extending/class.t
@@ -0,0 +1,24 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use lib 't/lib';
+
+{
+ package Foo;
+ use Moose;
+ use Command;
+
+ sub foo {
+ }
+
+ command bar => sub {
+ };
+}
+
+ok(Foo->meta->has_method('bar'));
+is_deeply([Foo->meta->get_all_commands], [Foo->meta->get_method('bar')]);
+ok(Foo->meta->has_command('bar'));
+ok(!Foo->meta->has_command('foo'));
+
+done_testing;