X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F108_ArrayBasedStorage_test.t;h=f47b010a9666ca4f1c6f23aa4200d54ed20a1488;hb=41fc2d0fd29483cb704e06198bfaabbcd3e09d08;hp=a2dc99c15cedff700515a0c90317815d61be0473;hpb=caab0eaaa67d626df9e0113822d95fcfa0968022;p=gitmo%2FClass-MOP.git diff --git a/t/108_ArrayBasedStorage_test.t b/t/108_ArrayBasedStorage_test.t index a2dc99c..f47b010 100644 --- a/t/108_ArrayBasedStorage_test.t +++ b/t/108_ArrayBasedStorage_test.t @@ -1,5 +1,3 @@ -#!/usr/bin/perl - use strict; use warnings; @@ -7,8 +5,7 @@ use Test::More tests => 72; use File::Spec; use Scalar::Util 'reftype'; -BEGIN { - use_ok('Class::MOP'); +BEGIN {use Class::MOP; require_ok(File::Spec->catfile('examples', 'ArrayBasedStorage.pod')); } @@ -197,4 +194,9 @@ is($baz->foo(), 'This is Bar::Baz::foo', '... Bar::Baz::foo == "This is Bar"'); is($baz->get_bar(), 'FOO is BAR', '... Bar::Baz::bar has been initialized'); is($baz->bling(), 'Baz::bling', '... Bar::Baz::bling has been initialized'); +Foo->meta->add_attribute( forgotten => is => "rw" ); + +my $new_baz = Bar::Baz->new; + +cmp_ok( scalar(@$new_baz), ">", scalar(@$baz), "additional slot due to refreshed meta instance" );