From 07df3a29274a3ea803f2667403b3838647a251df Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 7 May 2010 13:37:46 -0500 Subject: add test for mop stuff --- t/003-mop.t | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 t/003-mop.t diff --git a/t/003-mop.t b/t/003-mop.t new file mode 100644 index 0000000..53b0b2e --- /dev/null +++ b/t/003-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; -- cgit v1.2.3-54-g00ecf