X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F020_attributes%2F028_no_slot_access.t;h=8819db38dddab6c5ec5391c1715238e19a6903fe;hb=ea829e77f657851c78cd65dd2b7ed05ce6c6ffff;hp=7587bbb54a8815430ce7bd941e6baef148e91cf4;hpb=a28e50e44945358d15eb19e4688573741a319fe0;p=gitmo%2FMoose.git diff --git a/t/020_attributes/028_no_slot_access.t b/t/020_attributes/028_no_slot_access.t index 7587bbb..8819db3 100644 --- a/t/020_attributes/028_no_slot_access.t +++ b/t/020_attributes/028_no_slot_access.t @@ -61,32 +61,29 @@ use warnings; use Moose::Util::MetaRole; use Test::More; - use Test::Exception; + use Test::Fatal; - Moose::Util::MetaRole::apply_metaclass_roles( - for_class => __PACKAGE__, - instance_metaclass_roles => ['MooseX::SomeAwesomeDBFields'] + Moose::Util::MetaRole::apply_metaroles( + for => __PACKAGE__, + class_metaroles => { instance => ['MooseX::SomeAwesomeDBFields'] }, ); - lives_ok { + is( exception { has lazy_attr => ( is => 'ro', isa => 'Bool', lazy => 1, default => sub {0}, ); - } - "Adding lazy accessor does not use inline_slot_access"; + }, undef, "Adding lazy accessor does not use inline_slot_access" ); - lives_ok { + is( exception { has rw_attr => ( is => 'rw', ); - } - "Adding read-write accessor does not use inline_slot_access"; + }, undef, "Adding read-write accessor does not use inline_slot_access" ); - lives_ok { __PACKAGE__->meta->make_immutable; } - "Inling constructor does not use inline_slot_access"; + is( exception { __PACKAGE__->meta->make_immutable; }, undef, "Inling constructor does not use inline_slot_access" ); done_testing; }