summaryrefslogtreecommitdiffstats
path: root/t/03-mop.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2010-06-24 13:54:24 -0500
committerJesse Luehrs <doy@tozt.net>2010-06-24 14:35:37 -0500
commitc79f16aa7fdad589f8b29b0a9d4ae39b66f6efbe (patch)
treeb82ea553ebf56570a0ec19f6a7f20d66b0cc025e /t/03-mop.t
parente487cbac42aac4f6bded38ffc91b66e1d1d1ddc6 (diff)
downloadmoosex-attribute-shorthand-c79f16aa7fdad589f8b29b0a9d4ae39b66f6efbe.tar.gz
moosex-attribute-shorthand-c79f16aa7fdad589f8b29b0a9d4ae39b66f6efbe.zip
convert to new dzil stuff
Diffstat (limited to 't/03-mop.t')
-rw-r--r--t/03-mop.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/t/03-mop.t b/t/03-mop.t
new file mode 100644
index 0000000..53b0b2e
--- /dev/null
+++ b/t/03-mop.t
@@ -0,0 +1,23 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+
+{
+ package Foo;
+ use Moose;
+ use MooseX::Attribute::Shorthand string => {
+ is => 'ro',
+ isa => 'Str',
+ default => sub { $_[1] },
+ -meta_attr_options => { isa => 'Str' },
+ };
+
+ has foo => (string => 'FOO');
+}
+
+my $attr = Foo->meta->get_attribute('foo');
+can_ok($attr, 'string');
+is($attr->string, 'FOO', "attribute set properly");
+
+done_testing;