summaryrefslogtreecommitdiffstats
path: root/t/03-mop.t
diff options
context:
space:
mode:
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;