From: Shawn M Moore Date: Sun, 7 Dec 2008 01:06:52 +0000 (+0000) Subject: Failing test for an unparameterized method X-Git-Tag: 0.05~45 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ec1fb2f4b4c561ff980fde4f7a598670653e1e1f;p=gitmo%2FMooseX-Role-Parameterized.git Failing test for an unparameterized method --- diff --git a/t/014-compose-parameterizable.t b/t/014-compose-parameterizable.t new file mode 100644 index 0000000..4423fe4 --- /dev/null +++ b/t/014-compose-parameterizable.t @@ -0,0 +1,36 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More tests => 2; + +do { + package MyRole; + use MooseX::Role::Parameterized; + + parameter attribute => ( + is => 'ro', + isa => 'Str', + ); + + sub meth { 1 } + + role { + my $p = shift; + + has $p->attribute => ( + is => 'ro', + ); + }; +}; + +do { + package MyClass; + use Moose; + with 'MyRole' => { + attribute => 'attr', + }; +}; + +ok(MyClass->can('attr'), "the parameterized attribute was composed"); +ok(MyClass->can('meth'), "the unparameterized method was composed"); +