From: Andrew Moore Date: Thu, 18 Jun 2009 16:49:18 +0000 (-0500) Subject: fixing test suite to address RT ticket 47119 X-Git-Tag: 0.87~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f6d801a0d846a52beb59adf4bb48cd15c30a1840;p=gitmo%2FClass-MOP.git fixing test suite to address RT ticket 47119 changing test to require a specific version of Moose. Old versions of Moose would make the tests fail. Now they're skipped. --- diff --git a/t/310_immutable_destroy.t b/t/310_immutable_destroy.t index 0cae21f..8f54dbe 100644 --- a/t/310_immutable_destroy.t +++ b/t/310_immutable_destroy.t @@ -1,11 +1,12 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More tests => 2; use Class::MOP; SKIP: { - unless (eval { require Moose; 1 }) { - skip 'This test requires Moose', 1; + unless (eval { require Moose; Moose->VERSION(0.72); 1 }) { + diag( $@ ); + skip 'This test requires Moose 0.72', 2; exit 0; } @@ -13,7 +14,7 @@ SKIP: { local $SIG{__WARN__} = sub {}; eval <<'EOF'; package FooBar; - use Moose; + use Moose 0.72; has 'name' => ( is => 'ro' ); @@ -23,6 +24,8 @@ SKIP: { EOF } + ok( ! $@, 'evaled FooBar package' ) + or diag( $@ ); my $f = FooBar->new( name => 'SUSAN' ); is( $f->DESTROY, 'SUSAN',