Skip Kwalitee tests for now
[gitmo/MooseX-ClassAttribute.git] / t / 07-parameterized-role.t
CommitLineData
8017308b 1use strict;
2use warnings;
3272340d 3
cf7a55f0 4use Test::More;
9f0ece1b 5use Test::Exception;
8017308b 6
cf7a55f0 7plan skip_all =>
8 'This test will not pass without changes to MooseX::Role::Parmeterized';
8017308b 9
1403ec92 10{
8017308b 11 package Role;
cf7a55f0 12
8017308b 13 use MooseX::Role::Parameterized;
14 use MooseX::ClassAttribute;
cf7a55f0 15
16 parameter foo => ( is => 'rw' );
1403ec92 17
18 role {
19 my $p = shift;
20
cf7a55f0 21 class_has $p => ( is => 'rw' );
1403ec92 22 };
cf7a55f0 23}
8017308b 24
cf7a55f0 25{
8017308b 26 package Class;
cf7a55f0 27
8017308b 28 use Moose;
cf7a55f0 29
1403ec92 30 with 'Role' => { foo => 'foo' };
31}
32
cf7a55f0 33my $instance = Class->new();
34isa_ok( $instance, 'Class' );
8017308b 35
1403ec92 36lives_and {
37 $instance->foo('bar');
cf7a55f0 38 is( $instance->foo(), 'bar' );
39}
40'used class attribute from parameterized role';
8017308b 41
cf7a55f0 42done_testing();