From: Dylan William Hardison Date: Thu, 11 Jun 2009 14:55:18 +0000 (+0000) Subject: Alright, test skips in the absense of Moose now. X-Git-Tag: 0.86~19 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=935fdc897cf89802bb3ca8089b08b8a5cbb66ff2;p=gitmo%2FClass-MOP.git Alright, test skips in the absense of Moose now. --- diff --git a/t/310_immutable_destroy.t b/t/310_immutable_destroy.t index cac6108..4e3e38f 100644 --- a/t/310_immutable_destroy.t +++ b/t/310_immutable_destroy.t @@ -3,15 +3,13 @@ use warnings; use Test::More tests => 1; use Class::MOP; -BEGIN { - if (not Class::MOP::load_class('Moose::Object')) { +SKIP: { + if (not eval { require Moose; 1 }) { skip 'test requires moose', 1; exit 0; } -} - -{ + eval <name } __PACKAGE__->meta->make_immutable; -} +FOOBAR -my $f = FooBar->new( name => 'SUSAN' ); + my $f = FooBar->new( name => 'SUSAN' ); -is( $f->DESTROY, 'SUSAN', 'Did moose overload DESTROY?' ); + is( $f->DESTROY, 'SUSAN', 'Did moose overload DESTROY?' ); +}