make inlining a bit more easily extensible
[gitmo/Class-MOP.git] / t / 108_ArrayBasedStorage_test.t
index a2dc99c..58ff1d4 100644 (file)
@@ -1,14 +1,12 @@
-#!/usr/bin/perl
-
 use strict;
 use warnings;
 
-use Test::More tests => 72;
+use Test::More;
 use File::Spec;
 use Scalar::Util 'reftype';
+use Class::MOP;
 
 BEGIN {
-    use_ok('Class::MOP');
     require_ok(File::Spec->catfile('examples', 'ArrayBasedStorage.pod'));
 }
 
@@ -197,4 +195,10 @@ 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" );
 
+done_testing;