X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F000-recipes%2F001_point.t;h=1f52f0ff57f53c44a85780aed59bdc647f4b1b21;hb=e578d610be7812bb5fc5c861aeee01fe9270aa2f;hp=450055c821de9e827c09412992e57cbda6b93ab0;hpb=78b163fb6086e794180c5dbee9456371a408a646;p=gitmo%2FMouse.git diff --git a/t/000-recipes/001_point.t b/t/000-recipes/001_point.t index 450055c..1f52f0f 100644 --- a/t/000-recipes/001_point.t +++ b/t/000-recipes/001_point.t @@ -6,7 +6,7 @@ use warnings; use Test::More; BEGIN { if (eval "require Class::Method::Modifiers; 1") { - plan tests => 58; + plan tests => 59; } else { plan skip_all => "Class::Method::Modifiers required for this test"; @@ -14,11 +14,7 @@ BEGIN { } use Mouse::Util; -use t::Exception; - -BEGIN { - use_ok('Mouse'); -} +use Test::Exception; { package Point; @@ -33,6 +29,7 @@ BEGIN { $self->y(0); } + __PACKAGE__->meta->make_immutable(); }{ package Point3D; use Mouse; @@ -46,6 +43,7 @@ BEGIN { $self->{z} = 0; }; + __PACKAGE__->meta->make_immutable(); } my $point = Point->new(x => 1, y => 2); @@ -136,16 +134,16 @@ is_deeply( [ 'Mouse::Object' ], '... Point got the automagic base class'); -my @Point_methods = qw(meta new x y clear); +my @Point_methods = qw(meta new x y clear DESTROY); my @Point_attrs = ('x', 'y'); -SKIP: { - skip "Mouse has no method introspection", 2 + @Point_methods; +is_deeply( + [ sort @Point_methods ], + [ sort Point->meta->get_method_list() ], + '... we match the method list for Point'); - is_deeply( - [ sort @Point_methods ], - [ sort Point->meta->get_method_list() ], - '... we match the method list for Point'); +SKIP: { + skip "Mouse has no method introspection", 1 + @Point_methods; is_deeply( [ sort @Point_attrs ], @@ -176,7 +174,7 @@ is_deeply( [ 'Point' ], '... Point3D gets the parent given to it'); -my @Point3D_methods = qw(new meta clear); +my @Point3D_methods = qw(new meta clear DESTROY); my @Point3D_attrs = ('z'); SKIP: {